Resume Statement

The Resume statement can be used to resume execution after a run-time error occurs.
You can only use this statement inside an error handling routine.
Every time this statement is executed the Err Object is automatically reset.


Resume

This will move the execution back to the statement that caused the error.
If the error has not been resolved, the same error will be raised again which will create an infinite loop.


Resume Next

This will move the execution to the line after the statement that caused the error.
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.
If the error occurred in a called procedure, execution resumes with the statement immediately following the statement that last called out of the procedure containing the error-handling routine (or the On Error Resume Next statement).


Resume LineLabel

This will move execution to the corresponding line label.
The line argument is a line label or line number and must be in the same procedure as the error handler.


Nested Subroutines

If the error occurred in a called procedure, execution resumes at the statement that last called out of the procedure containing the error-handling routine.


Resume without error

If it is used outside of an error handling routine a runtime error 20 "Resume without error" error will occur.
SS


© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext