Visual Basic: MSComm Control

OnComm Event

See Also   Example   Applies To

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:

Part Description
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.