MSCOMM

ricgre
10-19-2001, 12:43 PM
On a form Startup I have the following code.

InitPort:
MSComm1.CommPort = 1
MSComm1.Handshaking = comNone
If MSComm1.PortOpen = False Then
MSComm1.PortOpen = True
PortIsOpen = True
End If

The first portOpen states returns False, on the very next statenemt a receive the "8005" error stating that the port is open. Any idea what would cause this? on form unload I have:

If PortIsOpen then
Mscomm1.PortOpen = False
Set form = Nothing
End if

hashir56
10-21-2001, 09:39 AM
try putting a doevents before the if...then statement

Jared
10-21-2001, 01:47 PM
Make sure that the port is not already in use by another application. I don't believe that MSComm.PortOpen will return TRUE if another app is using the port.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum