Autofilter

Post date: Feb 20, 2020 2:10:12 PM

Turn off Autofilter in VBA

Public Sub KillFilter()

If ActiveSheet.AutoFilterMode Then

ActiveSheet.AutoFilterMode = False

End If

End Sub

Turn on Autofilter in VBA

Public Sub StartFilter()

If Not ActiveSheet.AutoFilterMode Then

ActiveSheet.Range("A1").AutoFilter

End If

End Sub