Toggle button

K

keithl816

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
 
T

twox4s

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top