On Error GoTo ErrorHandler
You should always use a consistent line label for your error handling.
Public Sub MySubroutine()
On Error GoTo ErrorHandler
Exit Sub
ErrorHandler:
Call MsgBox(Err.Number & " - " & Err.Description)
End Sub
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext