Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a form with 10 toggle buttons. Each toggle button uses the same code.
How can I change the code so that is uses one piece of code instead on ten sets of code. Private Sub ToggleButton11_Click() If ToggleButton11.Value = True Then ToggleButton11.Caption = " " ToggleButton11.BackColor = RGB(0, 255, 0) Else ToggleButton11.Caption = " " ToggleButton11.BackColor = RGB(255, 0, 0) End If End Sub Thanks Bill |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use the same method as shown here
http://www.j-walk.com/ss/excel/tips/tip44.htm for handling multiple commandbuttons. -- Regards, Tom Ogilvy "Bill" wrote: I have a form with 10 toggle buttons. Each toggle button uses the same code. How can I change the code so that is uses one piece of code instead on ten sets of code. Private Sub ToggleButton11_Click() If ToggleButton11.Value = True Then ToggleButton11.Caption = " " ToggleButton11.BackColor = RGB(0, 255, 0) Else ToggleButton11.Caption = " " ToggleButton11.BackColor = RGB(255, 0, 0) End If End Sub Thanks Bill |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
have toggle buttons but everytime print preview buttons move | Excel Discussion (Misc queries) | |||
Toggle command buttons | Excel Programming | |||
Colouring Stuff, Toggle Buttons | Excel Programming | |||
Toggle Buttons | Excel Programming | |||
multiple toggle buttons | Excel Programming |