Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default referring to the button that triggered the macro

Hello,
In one of my subs I need to capture the name of the button that
triggered it. Something like
right(thisbutton.name,3).
Could anyone tell me how to do this?
Thanks a lot.
Herman
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default referring to the button that triggered the macro

Right(Application.Caller,3)

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



wrote in message
...
Hello,
In one of my subs I need to capture the name of the button that
triggered it. Something like
right(thisbutton.name,3).
Could anyone tell me how to do this?
Thanks a lot.
Herman



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default referring to the button that triggered the macro

Callername = Right(Parent.Parent.Caller, 3)
MsgBox Callername

" wrote:

Hello,
In one of my subs I need to capture the name of the button that
triggered it. Something like
right(thisbutton.name,3).
Could anyone tell me how to do this?
Thanks a lot.
Herman

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
Referring to Option Button in If then statement Mike Excel Discussion (Misc queries) 3 May 17th 08 03:44 PM
Runing two macros triggered by a button Paul B Excel Discussion (Misc queries) 1 December 9th 05 12:51 AM
Runing two macros triggered by a button Dave Peterson Excel Discussion (Misc queries) 0 December 9th 05 12:43 AM
Referring to an option button in formula...? jay Excel Programming 1 September 3rd 04 03:50 PM
Create event triggered by Pivot Chart field button Mike Collard Excel Programming 0 January 28th 04 12:00 PM


All times are GMT +1. The time now is 11:44 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"