I have added some check boxes that will sort my data, in this case removing rows with values of 0. Currently, I have a checkbox with
It filters the way I want when I check it, but when I uncheck it, it doesn’t go back to what it was before, is this possible to do?
I tried using the same code with a few other button types like toggle, and it did the same thing. I would prefer to use a checkbox, but any type is fine.
Thanks
PS. Its not as important, but I was also wondering if it was possible to reverse it so that it filters things out when its not checked, and doesn’t filter when it is checked.
Code:
Private Sub CheckBox1_Click()
Selection.AutoFilter Field:=27, Criteria1:="<>0", Operator:=xlAnd
End Sub
It filters the way I want when I check it, but when I uncheck it, it doesn’t go back to what it was before, is this possible to do?
I tried using the same code with a few other button types like toggle, and it did the same thing. I would prefer to use a checkbox, but any type is fine.
Thanks
PS. Its not as important, but I was also wondering if it was possible to reverse it so that it filters things out when its not checked, and doesn’t filter when it is checked.