Scope of 'On Error Resume Next'?
The scope is the for that Sub.
After exiting the sub it is - say - reset.
As to specify different ones within the sub,
you can do On Error GoTo 0
'0' is not a label, it is just used to reset the Resume.
Thus if
On Error Resume Next
'line one of code
'line two of code
On Error GoTo 0
The resume next part will work only for the lines between Resume Next and
GoTo 0, After the GoTo 0 .
You can again use Resume Next "after the GoTo 0" on
any further down lines. (and use again GoTo 0)
Sharad
"Matt Jensen" wrote in message
...
What is the 'scope' of On Error Resume Next?
Is it for a sub, for the next line after the statement only, for a module,
or for a workbook/project?
If more than one of these, how does one specify the different ones?
Thanks
Matt
|