Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
toggling checkboxes
I want to add several checkboxes to the worksheet and to have them working
similar to option box, so that only one can be selected in any particulart time. I have created several procedures acting on CheckBox_click event but I can not figure on how to set the values for other checkboxes. Using CheckBox2.Value = False or CheckBox2.Value = 0 does not work, I am getting error messages related to missing objects. How my code should look like ? Thanks for help. Regards, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
toggling checkboxes
hi
here is one way to do it. you may have to work your other code in/around it. the trick is that if one checkbox is true(checked) the others are set to false with all checkboxes looking at all the other checkboxes. Private Sub CheckBox1_Click() If CheckBox1 = True Then CheckBox2 = False CheckBox3 = False End If End Sub Private Sub CheckBox2_Click() If CheckBox2 = True Then CheckBox1 = False CheckBox3 = False End If End Sub Private Sub CheckBox3_Click() If CheckBox3 = True Then CheckBox1 = False CheckBox2 = False End If End Sub regards FSt1 "Tony" wrote: I want to add several checkboxes to the worksheet and to have them working similar to option box, so that only one can be selected in any particulart time. I have created several procedures acting on CheckBox_click event but I can not figure on how to set the values for other checkboxes. Using CheckBox2.Value = False or CheckBox2.Value = 0 does not work, I am getting error messages related to missing objects. How my code should look like ? Thanks for help. Regards, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with toggling display | Excel Discussion (Misc queries) | |||
toggling between 2 workbooks | Excel Programming | |||
toggling | Excel Worksheet Functions | |||
Toggling autofit | Excel Discussion (Misc queries) | |||
toggling a chart on and off | Excel Programming |