Re: Com port framming error
In your MSComm_OnComm() event handler you're supposed to have something like this:
Code:
dim ErMsg$
Select Case MSComm1.CommEvent
' handle events
Case vbMSCommEvReceive
'handle incoming data
'other Cases are for errors
Case vbMSCommErFrame
ErMsg = "Frame-error"
Case vbMSCommErOverrun
ERMsg = "Overrun"
Case vbMSCommErCDTO
ERMsg = "Carrier timeout"
Case vbMSCommErRxOver
ERMsg = "Receive buffer overrun"
Case vbMSCommErRxParity
ErMsg = "Parityerror"
Case vbMSCommErTxFull
ErMsg = "Sendbuffer full"
End Select
debug.print ErMsg
The above sample shows how to detect what kind of error occurs.
E.g. if you really had a frame error, the CommEvent would be vbMSCommErFrame and the apropriate Case statement would be executed, here loading an error message which is then printed.
Maybe that gives you a clue what error really occurs and you might take measures in the apropriate Case.