Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check Boxes
I have a Series of Check Boxes (the ActiveX Control) inserted onto an Excel
Spreadsheet. I have another Check Box that I want to use as most are used, when it gets checked, all the checkboxes will show themselves as checked. The only way i can figure to do this is to loop through all the check boxes, one by one and change its state to checked. The way I want to see it done is whenever the Main checkbox is checked i want all the other checkboxes to change state to checked simultaneously....not one at a time when looping. Is there a way this can be done or am I stuck with the loop? Any thoughts or suggestions would be greatly appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check Boxes
A loop I am afraid, but automatic.
This assumes the master checkbox is called chkMaster Private Sub chkMaster_Click() Dim mpOLEObject As Object With Me For Each mpOLEObject In .OLEObjects If TypeName(mpOLEObject.Object) = "CheckBox" Then If mpOLEObject.Name < "chkMaster" Then mpOLEObject.Object.Value = Me.OLEObjects("chkMaster").Object.Value End If End If Next mpOLEObject End With End Sub -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Kevin E." wrote in message ... I have a Series of Check Boxes (the ActiveX Control) inserted onto an Excel Spreadsheet. I have another Check Box that I want to use as most are used, when it gets checked, all the checkboxes will show themselves as checked. The only way i can figure to do this is to loop through all the check boxes, one by one and change its state to checked. The way I want to see it done is whenever the Main checkbox is checked i want all the other checkboxes to change state to checked simultaneously....not one at a time when looping. Is there a way this can be done or am I stuck with the loop? Any thoughts or suggestions would be greatly appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy and move check box (check boxes) with new cell link? | Excel Worksheet Functions | |||
all the check boxes should be checked if i check a particular checkbox in that row | Excel Programming | |||
How do I increase the size of check in check boxes | Excel Discussion (Misc queries) | |||
Enable check box in protected sheet + group check boxes | Excel Discussion (Misc queries) | |||
How do i create a value for check boxes or option boxes | Excel Discussion (Misc queries) |