OnError Event  
 

The OnError event is generated when an error occurs.

Syntax

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

Remarks

The OnError event is generated when an error occurs while the component is performing an operation. Visual Basic errors do not generate 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 component correspond to those returned by the standard Windows Sockets library.

The Description argument is a string that describes the error. This corresponds to the LastErrorString property.

See Also

LastError Property, LastErrorString Property