hii guys ,
there is no direct method to get the available commports
its a check and list basis to know the available ports
here is the code
Private Sub MDIForm_Load()
Dim I As Integer
On Error Resume Next
With GPS
If .PortOpen = True Then .PortOpen = False
For I = 1 To 16
.CommPort = I
.PortOpen = True
If err.Number = 0 Then
PortSel.AddItem "Com " & Format$(I)
.PortOpen = False
Else
err.Clear
End If
Next I
End With
End Sub