View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default ActiveSheet.ShowAllData

Hi Slim,

Following shows how to test if individual filter is on and how to turn off
an individual filter. (You don't have to test if on before turning off; that
is just part of my example. However, need to test for .AutoFilterMode
otherwise the code errors if AutoFilter NOTon.).


Sub FilterTest()

With Worksheets("Sheet1")
If .AutoFilterMode Then
'Test if filter 3 is applied
If .AutoFilter.Filters(3).On Then
'Turn off filter 3
.AutoFilter.Range.AutoFilter Field:=3
End If
End If
End With
End Sub


One would think that .AutoFilter.Filters(3).On = False should work but it
doesn't and I can't find any other method other than my example to turn if
off.

--
Regards,

OssieMac