Good morning everyone. I'm stuck on using a code to hide rows using an active x checkbox. I'm still trying to understand VBA codes. I would like to show if check box is checked, all rows will be unhide. If it's not checked, it will only show rows that has a value in column B. This I what I'm using for now, it only works if a cell has a value of "SA*".
Code:
Private Sub CheckBox1_Click()
If CheckBox1 Then
Range("b2:b350").AutoFilter Field:=1, Criteria1:="SA*"
Else
ActiveSheet.AutoFilterMode = False
End If
End Sub