On Error Resume Next
On Error Resume Next is a special variant of the On Error statement. You use this statement, instead of On Error Goto, when you want to defer error trapping. When an error occurs and On Error Resume Next is in effect, VBA makes note of the error, but does not do anything about it—execution simply continues with the next statement. You are not ignoring the error, but simply deferring the handling of it. On Error Resume Next is most useful when your program is accessing objects, such as automation objects, because all of the information you need to handle the error may not be available at the very instant the error occurs.
The way to use On Error Resume Next is as follows: When working with objects, identify the locations in ...
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