Hi
I have a table where I want to either show 'blanks' or show 'all'.
The below code just keeps it on showing blanks. Can anyone help to add a filter if not applied and then show all / just show blanks based on field 5?
many thanks in advance
I have a table where I want to either show 'blanks' or show 'all'.
The below code just keeps it on showing blanks. Can anyone help to add a filter if not applied and then show all / just show blanks based on field 5?
many thanks in advance
Code:
Private Sub ToggleButton1_Click()
If ActiveSheet.AutoFilterMode = True Then
'autofilter is on...
ActiveSheet.AutoFilterMode = False
Else
'autofilter is not on...
ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=5, Criteria1:=""
End If
End Sub