-
data
hi im tryin to configure a comm control to notify me when data comes n goes, i established an internet dial up connection n then ran the following code which din't do ne thing
Const comEvSend = 1
Const comEvReceive = 2
Private Sub Form_Load()
MSComm1.CommPort = 3
End Sub
Private Sub MSComm1_OnComm()
If CommEvent = comEvSen Then
MsgBox "Data sent"
ElseIf CommEvent = comevrecieve Then
MsgBox "Data recieved"
End If
End Sub
-
Re: data
I don't think you can do what you want this way. In order to use the COM port from your code you must open it from your code (MSComm1.PortOpen = True). If is already in use by your internet connection you won't be able to open it.
Maybe you can look at capturing Windows messages being passed to/from the COM port. I don't know off-hand how to do this, but there should be posts on this site that would help.