CJW_14
07-17-2018, 04:50 PM
Hi There,
I have following code that uses the text of form controls checkboxes to filter a list if they are checked.
I want to perform this exact same function but use activeX checkboxes and for the life of me I cant figure it out.
Any help would be greatly appreciated.
Dim arrList() As String, Cnt As Long
Cnt = 0
For Each CheckBox In ThisWorkbook.Sheets("Checkboxes").CheckBoxes
If CheckBox.Value = 1 Then
ReDim Preserve arrList(Cnt)
arrList(Cnt) = CheckBox.Text
Cnt = Cnt + 1
End If
Next
Sheets("Sheet1").Range("$A$8:$S$10000").AutoFilter Field:=5, Criteria1:=arrList, Operator:=xlFilterValues
I have following code that uses the text of form controls checkboxes to filter a list if they are checked.
I want to perform this exact same function but use activeX checkboxes and for the life of me I cant figure it out.
Any help would be greatly appreciated.
Dim arrList() As String, Cnt As Long
Cnt = 0
For Each CheckBox In ThisWorkbook.Sheets("Checkboxes").CheckBoxes
If CheckBox.Value = 1 Then
ReDim Preserve arrList(Cnt)
arrList(Cnt) = CheckBox.Text
Cnt = Cnt + 1
End If
Next
Sheets("Sheet1").Range("$A$8:$S$10000").AutoFilter Field:=5, Criteria1:=arrList, Operator:=xlFilterValues