Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Dim btn As MSForms.CommandButton A sheet has a commandbutton. what i want to, I click the button, getting the button name. msgbox "this button name is " & xxx *** Sent via Developersdex http://www.developersdex.com *** |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You just need to use the caption property of the command button.
MsgBox "this button name is " & btn.Caption "x taol" wrote: Dim btn As MSForms.CommandButton A sheet has a commandbutton. what i want to, I click the button, getting the button name. msgbox "this button name is " & xxx *** Sent via Developersdex http://www.developersdex.com *** |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() RyanH! Surely, I already know it. I want to know caption of the command button, when I click the button the moment namely,,,,, 1.click the button 2.It seems the name of the button in the message box. *** Sent via Developersdex http://www.developersdex.com *** |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you need the whole sub, this should give you a starting point. Be sure to
change the CommandButton1 if you are using this with a button of a different name. Private Sub CommandButton1_Click() MsgBox CommandButton1.Caption MsgBox CommandButton1.Name End Sub "x taol" wrote in message ... RyanH! Surely, I already know it. I want to know caption of the command button, when I click the button the moment namely,,,,, 1.click the button 2.It seems the name of the button in the message box. *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How Can I Click an un-name IE button via VBA | Excel Programming | |||
Create floating button based on button click in menu | Excel Programming | |||
On Button Click(Help!) | Excel Programming | |||
VBA button click need help. Need LEN help. | Excel Programming | |||
VBA button click need help. Need LEN help. | Excel Programming |