Resume Instruction

Syntax

Resume label
-or-
Resume Next

Group

Error Handling

Description

Form 1 - Resumes execution at label.

Form 2 - Resumes execution at the next statement.

When an error occurs, the error handler can use Resume to continue execution. The error handler must use Resume or Exit at the end.

NOTE: This instruction clears the Err and sets Error`$' to null.

Example


Sub Main
    On Error GoTo X
    Err.Raise 1
    Debug.Print "RESUMING"
    Exit Sub
    
X:  Debug.Print "Err="; Err
    Resume Next
End Sub