I would like to be able to have an error message that tells me which procedure my error is in.
Here's an example of a basic error handler I may use:
err_Handler:
Dim msg As String
If Err.Number <> 0 Then
msg = "Error #" & Str(Err.Number) & " error Line: " & Erl & Chr(13) & _
Err.Description
MsgBox msg, , "Error", Err.HelpFile, Err.HelpContext
End If
Exit Sub
I would like my message box to return something on the lines of "Error in Report_btn_click". to achieve this I need to be able to get my procedure name as a string so that I can put "error in " & strProcName
.
However, I cant figure out how to do this or where to even start?!
Is it even possible?
Thanks!