single click to deactivate Auto Filters? How?

  • Thread starter Thread starter bkee62
  • Start date Start date
B

bkee62

Is there a way to have a icon or button in a tool bar that turns off
auto filters? I made a toll bar with Auto Filter and Show All but can
not find a way to turn off the filters with out going manually to the
main menu, then Filters and unchecking Auto Filter.
 
bkee62

This is a macro I was sent to do the job.

Sub Autofilter()
Selection.Autofilter
End Sub

Andy.
 
I use this on a file at work attached to a button from the forms toolbar

Sub Reset_Filter()
Application.ScreenUpdating = False
For Each sh In Worksheets
If sh.FilterMode Then
On Error Resume Next
sh.ShowAllData
End If
Next
Range("A1").Select
Application.ScreenUpdating = True
End Sub

You can skip the selection of A1 if you want


This will still leave the autofilter, to turn it off
completely you will need

ActiveSheet.AutoFilterMode = False
 
Back
Top