Thread: auto filter
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
monika monika is offline
external usenet poster
 
Posts: 28
Default auto filter

thanks...!
"Rob van Gelder" wrote in message
...
'This shows all the data if the list os filtered
Sub test()
With ActiveSheet
If .FilterMode Then .ShowAllData
End With
End Sub

'This removes the autofilter altogether
Sub test2()
With ActiveSheet
If .AutoFilterMode Then .AutoFilterMode = False
End With
End Sub



--
Rob van Gelder - http://www.vangelder.co.nz/excel


"monika" wrote in message
...

Can I check for a condition that if the sheet has auto
filter for a row then
it should deactivate....i.e. remove the auto filter and if
not found then
leave as it is.

I tried Selection.Autofilter. Using this I can remove the
auto filter if its
present but if not there then it puts it!

How can I check such a case

Thanks
Monika