View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] oldyork90@yahoo.com is offline
external usenet poster
 
Posts: 59
Default Command Button Question

On Tuesday, February 18, 2014 6:21:03 PM UTC-6, ron wrote:
I have a Command Button that I created using the Controls Toolbox. The Command Button is placed on a worksheet. What code do I need in the "Private Sub CommandButton1_Click()" macro to capture the name and caption of the Command Button after it has been clicked?..TIA, Ron


Building a toggle? If it was actX, something like this:
Private Sub CommandButton1_Click()
Dim s As String: s = CommandButton1.Caption
MsgBox s
End Sub