The effect of
ON ERROR ... ends as soon as one of the following is encountered:- Another
ON ERROR .... (Maybe in the form ofON ERROR RESUME xorON ERROR GOTO x) Exit Sub/Exit Functionwithin the same sub/function where defined.End Sub/End Functionof the sub/function where defined.
IS IT BAD TO USE
ON ERROR RESUME NEXT?
Yes and No.
Don't use without knowing what the effect of this statement would be. Avoid if possible. Keep the scope short wherever not possible.
To nullify the effect of an
ON ERROR RESUME NEXT statement, you can call ON ERROR GOTO 0


