Public Sub Foo() On Error Goto Foo_Err ' some code goes here Exit SubFoo_Err: ' Error handling code goes hereEnd Sub