Scripting > mrScriptBasic overview > mrScriptBasic language reference > Statements > Resume Next
 
Resume Next
Resumes execution after an error handling routine has finished.
Syntax
Resume Next
Remarks
If the error occurred in the same procedure as the error handler, execution resumes with the statement immediately following the statement that caused the error. Using a Resume Next statement anywhere except in an error handling routine generates an error.
Examples
This example uses the Resume Next statement to end error handling in a procedure, and then to resume execution with the statement following the statement that caused the error.
Sub ResumeStatementDemo()

On Error GoTo ErrorHandler ' Enable error handling routine
Dim X, strError
X = 1 / 0 ' Creates a divide by zero error

Exit Sub ' Exit Sub to avoid error handler

ErrorHandler: ' Error handling routine
' Use the error handler to log the error
' ...
Resume Next ' Resume to the next statement after the statement that caused the error
End Sub
See also
Statements