If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Initiate a trigger for clearing a list of check boxes?
I have a spreadsheet with a column of check boxes and I want to establish a
trigger to either check or uncheck all boxes at one time. |
#2
|
|||
|
|||
Initiate a trigger for clearing a list of check boxes?
You can use two contol buttons to run the code below. One control button
with the value in the code to true and the other to false Private Sub CommandButton1_Click() 'Set checkboxes to false For Each shp In ActiveSheet.Shapes If shp.OLEFormat.progID = "Forms.CheckBox.1" Then Set chkbox = ActiveSheet.OLEObjects(shp.Name).Object chkbox.Value = False End If Next End Sub Private Sub CommandButton2_Click() 'Set checkboxes true For Each shp In ActiveSheet.Shapes If shp.OLEFormat.progID = "Forms.CheckBox.1" Then Set chkbox = ActiveSheet.OLEObjects(shp.Name).Object chkbox.Value = True End If Next End Sub "JGarland" wrote: I have a spreadsheet with a column of check boxes and I want to establish a trigger to either check or uncheck all boxes at one time. |
Thread Tools | |
Display Modes | |
|
|