Is there a way to capture the current procedure name in a variable? For instance, when I click on cmdError, I would like strProcedureName to = "cmdError_Click".
Printable View
Is there a way to capture the current procedure name in a variable? For instance, when I click on cmdError, I would like strProcedureName to = "cmdError_Click".
VB Code:
Private Sub cmdError_Click() strProcedureName = "cmdError" 'error code goes here End Sub
Thanks, Hack.
I would rather not have to type the procedure name for each error. I would rather be able to pass the current procedure name another way. For instance...
Right now, I am passing the current form (Me.Name), and active control (me.activecontrol.name) for every event that gets fired by way of a control.
My problem is that when a procedure is run outside an event, I need to be able to capture the procedure name and pass it to another module. Instead of having to manually assign the procedure name, I was hoping to be able to do it with code somehow.
there is no other way.