A2003 on WinXP
In my control events I have a standard error routine called DispError which needs the name of the event that generated the error. A typical control event looks like this:
How do I get the event name, procname, using an object instead of assigning procname manually? I want to eliminate procname altogether.
Thank you.
In my control events I have a standard error routine called DispError which needs the name of the event that generated the error. A typical control event looks like this:
Code:
Private Sub Form_Timer()
Dim procname As String
On Error GoTo MyError
procname = "Form_Timer"
Me!lblClock.Caption = Format(Now, "mmm d yyyy, h:mm AMPM")
Exit Sub
MyError:
Call DispError(procname)
Exit Sub
End Sub
Thank you.