Note: "all lines after" for the current procedure. If sub2 was
called from sub1, then exiting sub2 and returning to sub1 resets the
error handler to sub1's, or the default.
For instance:
Public Sub Sub1()
On Error GoTo A
Sub2
Err.Raise 1
Exit Sub
A:
MsgBox "A"
On Error GoTo 0
End Sub
Public Sub Sub2()
On Error GoTo B
Sub3
Err.Raise 2
Exit Sub
B:
MsgBox "B"
End Sub
Public Sub Sub3()
On Error GoTo C
Err.Raise 3
Exit Sub
C:
MsgBox "C"
On Error GoTo 0
End Sub
The On Error GoTo 0 in Sub3 doesn't affect Sub2's call to B:, and
Sub1's call to A: is not affected by sub2's call to B:.