"Andrew Hall" <an**********@virgin.netwrote
For reasons of neat and tidiness in code can
anyone tell me how to get the name of a running
sub from the title of the sub and from within
itself as it is executing?
Both the free "mztools" from
http://www.mztools.com and FMS's product, Code
Tools,
http://www.fmsinc.com, have the capability to pick up a procedure's
name at compile time... you could store it in a variable. Both also have the
option of generating comments and code (normally used for error-handling) at
the click of an icon. AFAIK, the name of the sub is not available from the
system at execution-time.
There are some other similar products... and were more, but at least two
free products were discontinued by their authors in support of "mztools".
Larry Linson
Microsoft Access MVP