OnError Event  
 

The OnError event is generated when a control error occurs.

Syntax

Sub object_OnError ( [Index As Integer,] ByVal ErrorCode As Variant, ByVal Description As Variant )

Remarks

This event is generated when an error occurs during a control action. Errors not generated by the control itself, such as errors related to the programming language or general component errors, do not trigger this event.

The ErrorCode argument specifies the last error that has occurred. If the error is network related, the error code values returned by the control correspond to those returned by the standard Windows Sockets library.

The Description argument is a string that describes the error.

See Also

LastError Property, LastErrorString Property, ThrowError Property