Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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






  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default What macro is executing?

If you put that code in each macro, then you know the macro name. Just
include it in the message.



--
Regards,
Tom Ogilvy

"Ken Loomis" wrote in message
...
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








  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default What macro is executing?

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

"Tom Ogilvy" wrote in message
...
If you put that code in each macro, then you know the macro name. Just
include it in the message.



--
Regards,
Tom Ogilvy

"Ken Loomis" wrote in message
...
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










  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default What macro is executing?

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

On Tue, 12 Oct 2004 18:55:40 -0700, "Ken Loomis" wrote:

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

"Tom Ogilvy" wrote in message
...
If you put that code in each macro, then you know the macro name. Just
include it in the message.



--
Regards,
Tom Ogilvy

"Ken Loomis" wrote in message
...
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










Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Executing a macro in another file NSNR Excel Discussion (Misc queries) 1 December 11th 07 01:35 PM
executing a macro within another brian Excel Discussion (Misc queries) 3 July 5th 06 01:22 AM
Executing macro in one book from another. michaelberrier Excel Discussion (Misc queries) 3 June 26th 06 10:45 AM
How to abort executing macro? perfb Excel Programming 1 June 16th 04 07:15 PM
executing a macro from within a cell kduntley Excel Programming 2 May 13th 04 05:38 PM


All times are GMT +1. The time now is 01:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"