Try this, it requires you to have error control on every sub, which is not a problem at all.
Randall Rath wrote an automatic error handler function that writes the lines for you, very nice.
Sub ActiveCode()
Dim oIDE As VBE
Dim oPane As CodePane
Dim oMod As CodeModule
Dim sProc As String
Dim lngSC As Long 'Start column
Dim lngEC As Long 'End Column
Dim lngSL As Long 'Start Line
Dim lngEL As Long 'End Line
Dim sActiveProject As String
Dim sActModule As String
Set oIDE = Application.VBE
sActiveProject = oIDE.ActiveVBProject.Name
Set oPane = oIDE.ActiveCodePane
Set oMod = oPane.CodeModule
sActModule = oPane.CodeModule.Name
oPane.GetSelection lngSL, lngSC, lngEL, lngEC
sProc = oMod.ProcOfLine(lngSL, vbext_pk_Proc)
Debug.Print sActiveProject, sActModule, sProc
Debug.Print Err.Number, Err.Description
End Sub
And in another module I put the test
Sub errTest()
On Error GoTo Err_Control
Dim v As Integer
v = 1E+43
Debug.Print v
Exit_Here:
Exit Sub
Err_Control:
Select Case Err.Number
'Add your Case selections here
Case Else
ActiveCode
Err.Clear
Resume Exit_Here
End Select
End Sub