View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ken Loomis Ken Loomis is offline
external usenet poster
 
Posts: 143
Default What macro is executing?

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