![]() |
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. |
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. |
All times are GMT +1. The time now is 01:16 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com