Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default identify first macro run

when someone using my workbook runs one of my 5 macros using
"tools-macro-macro-run...." Depending on which one is started, a different
order of macros are run. Hence i need to capture the name of the first macro
that was run by the user. Is this possible?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default identify first macro run

Maybe you could use a hidden worksheet that can be populated with the name of
the macro.

Clear the range first (if you want), then each macro would write its name in the
next available cell.

Option Explicit
Sub Auto_Open()
with worksheets("HiddenSheetNameHere")
.cells.clear
.range("a1").value = "Order of Macs"
end with
End sub

Then each macro would have something like:

with worksheets("HiddenSheetNameHere")
.cells(.rows.count,"A").end(xlup).offset(1,0).valu e _
"NameOfThisMacro"
end with

And you could inspect that whenever you wanted.

sunilpatel wrote:

when someone using my workbook runs one of my 5 macros using
"tools-macro-macro-run...." Depending on which one is started, a different
order of macros are run. Hence i need to capture the name of the first macro
that was run by the user. Is this possible?


--

Dave Peterson
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
Macro is not able to identify the value. Heera[_2_] Excel Programming 3 February 13th 09 06:55 PM
Need to identify active worksheet in macro MLK Excel Worksheet Functions 1 March 13th 07 04:29 PM
how to identify the control that ran a macro? Andy Warner Excel Programming 5 April 20th 06 03:07 PM
Macro to identify bad dates Sandeman[_13_] Excel Programming 3 March 23rd 06 02:34 PM
How do you identify if a worksheet is in the last position in a Macro? Natasha[_2_] Excel Programming 2 August 8th 03 03:32 AM


All times are GMT +1. The time now is 07:06 AM.

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

About Us

"It's about Microsoft Excel"