Control Reference > VSPrinter Control > VSPrinter Events > Error Event |
Fired when an error is detected (a code is returned in the Error property).
Private Sub VSPrinter_Error()
This event is fired when the VSPrinter control detects a non-fatal error. The error code may be retrieved by reading the Error property. For a list of non-fatal errors, see the Error property.
This event is not fired when a fatal error occurs. To trap fatal errors, use the standard Visual Basic error handling mechanisms (On Error, and so on). Fatal errors include assigning an invalid value to a property, using invalid indices, running out of memory, or trying to open a file that doesn't exist.
You may use the ErrorDescription property to retrieve a description of an error based on it's code. For example:
Private Sub vp_Error()
Debug.Print vp.ErrorDescription(vp.Error)
End Sub