Option Explicit
Sub TestError()
Dim lRow As Long, lError As Long
Dim sCurrentAction As String
On Error GoTo labError
sCurrentAction = "Calling Initialisation"
Call Initialise
sCurrentAction = "Finding a non existant string"
lRow = WorksheetFunction.Match("qwerty", ActiveSheet.Columns("A"), 0)
sCurrentAction = "Doing something else"
Call DoSomethingElse
Exit Sub
labError:
MsgBox "Error " & Err.Number & " whilst " & sCurrentAction
End Sub
Private Sub Initialise()
MsgBox "Initialising"
End Sub
Private Sub DoSomethingElse()
MsgBox "Doing something else"
End Sub