EnableErrorHandling


The EnableErrorHandling method enables or disables system error handling in Visual Basic. System error handling allows processing object errors with OnError statement. System error handling is enabled by default.
BASIC
EnableErrorHandling(
  Enable As Boolean   // flag for enabling or disabling error handling
)

Parameters

Enable
If this parameter is TRUE system error handling is enabled, otherwise system error handling is disabled.

Return Values

The method has no return value.

Remarks

When IXFile method fails and system error handling is enabled Visual Basic generates an exception that can be trapped with OnError statement for further error processing. If system error handling is disabled method returns failure code which should be checked by user. In both situations GetError and GetFailure can be used for complete error information. See Error Handling in Visual Basic for more information.

See Also

IsErrorHandlingEnabled, GetError, GetFailure, Error Handling