ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Toggle Buttons (https://www.excelbanter.com/excel-programming/322714-toggle-buttons.html)

Momo

Toggle Buttons
 
Hello,
Can anyone give me a general idea of how to write code for toggle buttons, i
don't have a clue where to start for when it is depressed and when it isn't,
any help please, a sample simple macro or something, i want to use them to
hide, or unhide sheets,

Thanks,

Andy

Tom Ogilvy

Toggle Buttons
 
Private Sub ToggleButton1_Click()
If ToggleButton1.Value = True Then
MsgBox "depressed"
Else
MsgBox "Not depressed"
End If
End Sub

--
Regards,
Tom Ogilvy

"Momo" wrote in message
...
Hello,
Can anyone give me a general idea of how to write code for toggle buttons,

i
don't have a clue where to start for when it is depressed and when it

isn't,
any help please, a sample simple macro or something, i want to use them to
hide, or unhide sheets,

Thanks,

Andy




Momo

Toggle Buttons
 
Thanks Tom,
I managed to stumble through it myself by looking at a couple of other
posts, but cheers all the same


"Momo" wrote:

Hello,
Can anyone give me a general idea of how to write code for toggle buttons, i
don't have a clue where to start for when it is depressed and when it isn't,
any help please, a sample simple macro or something, i want to use them to
hide, or unhide sheets,

Thanks,

Andy



All times are GMT +1. The time now is 09:05 AM.

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