ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Toggle Button (https://www.excelbanter.com/excel-programming/280914-toggle-button.html)

Ben E[_2_]

Toggle Button
 


Hi All,
I'm trying to change the text on the face of a toggle
button when activated, i.e.: it will Switch between On &
Off when activated.

Any help would be appreciated.

Ben E


Tom Ogilvy

Toggle Button
 
Private Sub ToggleButton1_Click()
If ToggleButton1.Value Then
ToggleButton1.Caption = "On"
Else
ToggleButton1.Caption = "Off"
End If
End Sub

--
Regards,
Tom Ogilvy

"Ben E" wrote in message
...


Hi All,
I'm trying to change the text on the face of a toggle
button when activated, i.e.: it will Switch between On &
Off when activated.

Any help would be appreciated.

Ben E





All times are GMT +1. The time now is 09:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com