Hi all,
I have this code which checks/unchecks all of the checkboxes in my worksheet:
However, I have 2 columns with 10 checkboxes in each column and I would like to have 2 separate "select all" checkboxes for each column so they work independent of each other.
So one select all checkbox for all of the checkboxes in column A, and another select all checkbox for all of the checkboxes in column B.
I'm guessing I would have to name each checkbox individually but I'm not sure how to do this.
Thanks for your help.
I have this code which checks/unchecks all of the checkboxes in my worksheet:
VBA Code:
Sub SelectAll()
Dim xCheckBox As CheckBox
For Each xCheckBox In Application.ActiveSheet.CheckBoxes
If xCheckBox.Name <> Application.ActiveSheet.CheckBoxes("chkMasterB").Name Then
xCheckBox.Value = Application.ActiveSheet.CheckBoxes("chkMasterB").Value
End If
Next
End Sub
However, I have 2 columns with 10 checkboxes in each column and I would like to have 2 separate "select all" checkboxes for each column so they work independent of each other.
So one select all checkbox for all of the checkboxes in column A, and another select all checkbox for all of the checkboxes in column B.
I'm guessing I would have to name each checkbox individually but I'm not sure how to do this.
Thanks for your help.