Visual Basic: MSComm Control
The OnComm event is generated whenever the value of the CommEvent property changes, indicating that either a communication event or an error occurred.
Private Sub object_OnComm ()
The OnComm event syntax has these parts:
|object||An object expression that evaluates to an object in the Applies To list.|
The CommEvent property contains the numeric code of the actual error or event that generated the OnComm event. Note that setting the RThreshold or SThreshold properties to 0 disables trapping for the comEvReceive and comEvSend events, respectively.