If you try to filter a ListObject, and someone has turned the entire filter off by deselecting the Filter icon from the Data tab, then you’ll get an error. But how the heck can you easily test if the filter is on or not?
If you fire up the macro recorder, and click the Filter icon a few times to toggle it on and off, then you just get this:
You can write
but this simply serves to toggle the autofilter from it’s current state, and always returns true.
It seems to me that the only thing you can do is something like this:
Dim bOn As Boolean
bOn = False
On Error Resume Next
If lo.AutoFilter.Filters.Count > 0 Then
If Err.Number = 0 Then bOn = True
On Error GoTo 0
FilterIsOn = bOn