Name
Resume Statement
Syntax
Resume [0]
Resume Next
Resume labelDescription
Used to continue program execution when an error-handling routine is complete
Rules at a Glance
Resume can take any of the forms shown in the
following table:
|
Statement |
Description |
|---|---|
|
|
If the error-handling routine is in the same procedure as the statement that caused the error, program execution continues with the statement that caused the error. If the error occurred in an external procedure called by the procedure containing the error handler, program execution continues with the statement in the procedure containing the error handler that last called the external procedure. |
|
|
If the error-handling routine is in the same procedure as the statement that caused the error, program execution continues with the statement following the statement that caused the error. If the error occurred in an external procedure called by the procedure containing the error handler, program execution continues with the statement containing the error handler immediately following the statement that last called the external procedure. |
|
|
Program execution continues at the specified label. |
Programming Tips and Gotchas
You can only use the
Resumestatement in an error-handling routine; otherwise, a runtime error will be generated.An error-handling routine does not necessarily have to contain a
Resumestatement. If the error-handling ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access