an Exit Sub just before the error label, which forces the subroutine to exit immediately, without erroneously running the error code.
Public Sub Foo() On Error Goto Foo_Err ' some code goes here Exit Sub Foo_Err: ' Error handling code goes here End Sub