Resume Statement

The Resume statement stops the code that handles an error, and then passes control to the statement that immediately follows the statement where the error occurred. It does not return a value.

If you use Resume [0], then control passes to the statement where the error occurred.

The location of the error handler that handles the error determines where code resumes:

  • If the error is located in the same procedure as the error handler, then code flows to the statement that caused the error.

  • If the error is not located in the same procedure as the error handler, then code flows to the statement that last called the procedure that contains the error handler.

Format A

Resume Next
Resume label
Resume [0]

The following table describes the arguments that you can use with this method.

Argument Description

label

The label that identifies the code line to go to after handling an error.