ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Toggle button (https://www.excelbanter.com/excel-discussion-misc-queries/56581-toggle-button.html)

keithl816

Toggle button
 

Hello,

I have toggle buttons on a spreadsheet that opens hidden spreadsheets
when not in use. These sheets are just for correction purposes, so to
keep from having so many spreadsheets on the bottom bar, I hide them.
Is it possible to change the title in the button when the button is
depressed? I want the button to show DISPLAY when out and HIDE when
depressed.

Any help would be appreciated.

Larry


--
keithl816
------------------------------------------------------------------------
keithl816's Profile: http://www.excelforum.com/member.php...o&userid=21287
View this thread: http://www.excelforum.com/showthread...hreadid=486980


[email protected]

Toggle button
 
Insert this code with the appropriate name changes into the click event
of your button.
Private Sub ToggleButton1_Click()

MsgBox ToggleButton1.Value
If ToggleButton1.Value = True Then
ToggleButton1.Caption = "Hide"
Else
ToggleButton1.Caption = "Display"
End If

End Sub


keithl816

Toggle button
 

Hi twox4s,

Thanks for the reply. That worked great!!!!

Thanks again.

Larry


--
keithl816
------------------------------------------------------------------------
keithl816's Profile: http://www.excelforum.com/member.php...o&userid=21287
View this thread: http://www.excelforum.com/showthread...hreadid=486980



All times are GMT +1. The time now is 04:24 AM.

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