I've got an Error Handling routine that I call from my program sub's and function's. One of the routine's parameters ( a string) is the name of the sub or function from which it is called. For example...
Private Sub button1_OnClick()
On Error Goto HandleError
' code here
Exit_Gracefully:
Exit Sub
HandleError:
Call ErrorHandler("button1_OnClick", ...)
Resume Exit_Gracefully
End Sub
What I'd like to know is if I can reference the button1_OnClick string somehow so as I can copy and paste the function into each of my sub/function's without having to hardcode each one. It's very time consuming and I'm looking for a short cut!!!
Thanks for any help and or suggestions.
Private Sub button1_OnClick()
On Error Goto HandleError
' code here
Exit_Gracefully:
Exit Sub
HandleError:
Call ErrorHandler("button1_OnClick", ...)
Resume Exit_Gracefully
End Sub
What I'd like to know is if I can reference the button1_OnClick string somehow so as I can copy and paste the function into each of my sub/function's without having to hardcode each one. It's very time consuming and I'm looking for a short cut!!!
Thanks for any help and or suggestions.