OnComm Event

       

The OnComm event is generated whenever the value of the CommEvent property changes, indicating that either a communication event or an error occurred.

Syntax

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.

Remarks

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.