Change Toggle Button Caption

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

Guest

I'm not very good with VBA yet and I'm trying to get my toggle button to
change from "No" in the non-depressed state to "Yes" in the depressed state
and back again. I've tried searching and found a post by Allen Brown
(11/24/2004) but I can only get the button to change once. Any help would
greatly be appreciated.
 
Try something like this:

Option Compare Database
Public clicked As Boolean

Private Sub Command0_Click()
If clicked = True Then
Me.Command0.Caption = "No"
clicked = False
Else
Me.Command0.Caption = "Yes"
clicked = True
End If


End Sub
 
Thank you so much Linda! I had not expected to get a reply that fast. This
worked perfect.
 
Back
Top