What macro is executing?

  • Thread starter Thread starter Ken Loomis
  • Start date Start date
K

Ken Loomis

Is there a way to get the current macro name?

I'd like to add some code at the beginning of each macro like this:

If debugOn Then
MsgBox ("Entering" & activeMacro)
End If

and replace 'activeMacro' with whatever will return the name of the
currently executing macro. And use a public variable, "debugOn," to turn
that message box display on or off.

Thanks,
Ken Loomis
 
If you put that code in each macro, then you know the macro name. Just
include it in the message.
 
I could do that, but I was just hoping for a generic way to display the
currently exectuing macro,so I could quickly paste the same code into each
macro.

Ken
 
No can do. You have to use literal text for the name (or set a variable to
that same literal text).
 

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

Back
Top