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)
 
Back
Top