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
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.