
Returning sub or function name within a specific sub or function
No. The best you can do is use a string literal or constant:
Sub Form_Load()
Const PROC = "Form_Load"
On Error Goto ErrorHandler
...
Exit Sub
ErrorHandler Err.Raise Err.Number, PROC, "Doh!"
End Sub
(this is not meant to illustrate good error reporting!)
--
RobSmith
: Is it possible to obtain the name of the sub or function that is executing
: to be displayed in a message box when an error occurs