Is there a VBA statement that will return the string of the procedure that is executing?

J

Jon A

When on a form named frm_MyForm I can include the statement

Debug.Print "Form = " & Me.name

and I will get the result of

Form = frm_MyForm

Is there a similar statement or property that will print out
the name of the procedure that is running?

For example, if the currently-executing procedure is the
Form_Open event procedure, then I would like to print out
something like this

Procedure = Form_Open
 
D

Douglas J. Steele

Much to our chagrin, there isn't such functionality in VBA.

Most of us hard-code a constant or variable in each routine.

Assuming you're using Access 2000 or newer, take a look at the free add-in
from http://www.mztools.com
 
J

Jon A

Thanks for the lead to the tool. It looks like it might be
very useful. But it didn't get loaded and I can't find
information on the website to address it. Any thoughts?

Here's the story:
I have Win XP Pro SP2.
I am developing in Office 2003 but for Access 200 mode.

I downloaded it.
Put it into C:\Windows\MZTools.
Right-click on the DLL and selected "Register".
Got the message that it was registered successfully.
Started Access and VBA.
I don't find it anywhere.
Looked on the website - found no details on loading it.
 
D

Douglas J. Steele

It's not under Tools for you when you're in the VB editor?

Try contacting Carlos. There's a Contact option on the left-hand side of the
webpage.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top