command button caption

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a command button on a worksheet with a CLICK event handler. Is it
possible to toggle the caption on the button between say, Set , Reset with
each click?
 
I have a command button on a worksheet with a CLICK event handler. Is it
possible to toggle the caption on the button between say, Set , Reset with
each click?

Yes it is possible, I've just quickly made a userform to do this.
Could you provide more detail? Why you would want to do this, as it
looks a bit confusing to me, not least to your users. Is the button
running the same code with each click or different code?

Dave
 
Public Sub Test()
With ActiveSheet.Buttons("Button 1")
If .Caption = "Set" Then
.Caption = "Reset"
Else
.Caption = "Set"
End If
End With
End Sub


--
---
HTH

Bob

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top