Here i provide the solution .........
Function IsComPortAvailable(ByVal portNum As Integer) As Boolean
Dim fnum As Integer
On Error Resume Next
MSComm1.CommPort = portNum
MSComm1.PortOpen = True
If Err = 0 Then
MSComm1.PortOpen = False
IsComPortAvailable = True
End If
End Function
For i = 1 To 16
If IsComPortAvailable(i) Then
Combo1.AddItem (i)
End If
Next
Keep this code in timer and fix timer for 5 sec then it may show you every 5 secs which ports are available ...........