Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default how to get commandbutton name

If you are using command buttons from the control toolbox, just use

Me.CommandButton1.Name

If it is from the Forms toolbar, use

Application.Caller


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Sean" wrote in message
...
Hi All,

I have 3 commandbuttons that all run the same piece of code. In the code,

I
want to identify in the peice of code which of the commandbuttons were
clicked to run the code. I just want to get the name, like commandbutton1

or
commandbutton2. Is this possible?
thanks



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
Commandbutton alvin Kuiper Excel Programming 6 November 27th 05 06:28 PM
CommandButton Alvin Hansen[_2_] Excel Programming 3 August 16th 04 06:35 PM
CommandButton chris[_12_] Excel Programming 1 April 15th 04 01:01 AM
CommandButton rwebster3 Excel Programming 0 April 14th 04 08:16 PM
Commandbutton David Fixemer Excel Programming 2 February 25th 04 10:18 PM


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