LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to identify the control that ran a macro?


Hi all...

Windows XP
Excel 2000 (9)

I have a set of 10 control buttons on a worksheet, named "Button 1"
thru "Button 10" all with different text (which happens to be the sheet
name of various sheets in the workbook)

I assign the same macro to them all.

I want to know WHICH button called the macro, and then goto a different
worksheet depending on the .TEXT of the button that ran the macro

I can do
myString = [Button 1].Text

if I know its Button 1 that ran the macro.

I am hoping there is something like

myString = ActiveButton.Text

The question is.... how can I tell which button ran the macro, and thus
the .Text of that button??

Ive searched for all things to do with controls/buttons/macros in
several booka dn online - i guess I don't know what exactly to look
for!

any help appreciated.
Andy


--
Andy Warner
------------------------------------------------------------------------
Andy Warner's Profile: http://www.excelforum.com/member.php...o&userid=31363
View this thread: http://www.excelforum.com/showthread...hreadid=534515

 
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
Need to identify active worksheet in macro MLK Excel Worksheet Functions 1 March 13th 07 04:29 PM
Macro to identify bad dates Sandeman[_13_] Excel Programming 3 March 23rd 06 02:34 PM
Macro to identify year within a date smitty24 Excel Programming 1 March 4th 06 08:36 PM
Need a macro to Identify a users IP address havocdragon Excel Programming 3 February 28th 05 07:22 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 03:29 PM.

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"