Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How can I make the caption of the toggle button to change based on wether it
is on or off. On/Off Yes/No just something simple like that. -- Message posted via http://www.officekb.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there
you could use something like this Private Sub ToggleButton1_Click() If ToggleButton1.Value = True Then ToggleButton1.Caption = "On" Else ToggleButton1.Caption = "Off" End If End Sub Hope this helps |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Perfect
Thanks! Incidental wrote: Hi there you could use something like this Private Sub ToggleButton1_Click() If ToggleButton1.Value = True Then ToggleButton1.Caption = "On" Else ToggleButton1.Caption = "Off" End If End Sub Hope this helps -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200706/1 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Whilst I would maybe question the logic of doing this because:
- The idea of the control is that its state is visible from its appearance - Will the user be confused if they should click it to make if Off, or it currently is Off. I prefer the CheckBox for clarity. Ignores the Null state, which you can add if desired. Private Sub ToggleButton1_Click() With ToggleButton1 If .Value = True Then .Caption = "On" Else .Caption = "Off" End If End With End Sub NickHK "blackbox via OfficeKB.com" <u20390@uwe wrote in message news:7355a9b84c3b2@uwe... How can I make the caption of the toggle button to change based on wether it is on or off. On/Off Yes/No just something simple like that. -- Message posted via http://www.officekb.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Toggle Button | Excel Worksheet Functions | |||
Toggle Button | Excel Discussion (Misc queries) | |||
Toggle Button | Excel Discussion (Misc queries) | |||
Adding .xla button for Toggle Calculation Button | Excel Programming | |||
Toggle Button | Excel Programming |