Hi friends,
I'm trying to "uniformise" my error handling syntax from one form to another, or from one module to another.
I explain.
I have a sub I call on each error:
I call it like that :Code:Public Sub ErrorLog(sFunctionName As String) ... End Subwhere frmMain ist the form name, and CkAssign_Click the sub I want to write in the report generated by ErrorLog.Code:ErrorLog "frmMain.CkAssign_Click"
I have several forms so I changed for :So rest me to change it for something to get the function/sub name and have a command like thisCode:ErrorLog Me.Name & ".CkAssign_Click"
ErrorLog Me.Name & "." & sub_or_function_name
Also, "Me" runs only for forms. I would find something that can get the name of the "sheet" (Form, Module, Class..) so having a command like this :
I hope my explation is clear enoughCode:ErrorLog Sheet_Name & "." & sub_or_function_name
Is it possible or not ?
Thanks





1
Reply With Quote