[AccessD] A2K: Get Current Sub Name

Joshua B lists at jbsolutions.com.au
Fri Nov 14 02:23:44 CST 2003


Hello Darren DICK,

If you have the A2K Developers Error Handler add-in, you may be able to automate the process of "recording" the current sub name in each procedure. See, in the default setup of the add-in, it includes a line in each procedure as follows...

MsgBox "Error " & Err.Number & ": " & Err.Description, vbCritical, ModuleName.ProcedureName

So in theory, you should be able to setup an Error Handler template that doesnt really handle errors, but adds a line into each procedure like so

glblRunningProcedure = ModuleName.ProcedureName

Still not a pretty solution, but easier than doing it by hand....

======= At 2003-11-14, 12:35:00 you wrote: =======

>Hello all
>Is there a way to determine the current sub name once you are in it then display it
>Is there a Current Sub Property? etc
>
>eg  (PSEUDO Code)
>Private Sub MySub()
>Msgbox "My Sub Name is " & Application.SubName
>End sub
>
>Many thanks in advance
>
>Darren
>
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com

= = = = = = = = = = = = = = = = = = = =
			

Best regards.				 
Joshua B
lists at jbsolutions.com.au
www.jbsolutions.com.au
2003-11-14





More information about the AccessD mailing list