Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Turn Filters On and Off
The below code successfully adds AutoFilters to the selection. How do I
remove the AutoFilters? Tried recording a macro but the code is the same as for adding filters. Private Sub CommandButton4_Click() 'Command Button: "Add Filters" Application.ScreenUpdating = False Range("B3:I3").Select Selection.AutoFilter Application.ScreenUpdating = True End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Turn Filters On and Off
The same line that turn AutoFilter on is the same command that will turn them
off: Selection.AutoFilter -- Kevin Backmann "Phil H" wrote: The below code successfully adds AutoFilters to the selection. How do I remove the AutoFilters? Tried recording a macro but the code is the same as for adding filters. Private Sub CommandButton4_Click() 'Command Button: "Add Filters" Application.ScreenUpdating = False Range("B3:I3").Select Selection.AutoFilter Application.ScreenUpdating = True End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Turn Filters On and Off
You can also use
Activesheet.Autofiltermode = False -- Regards, Tom Ogilvy "Phil H" wrote: The below code successfully adds AutoFilters to the selection. How do I remove the AutoFilters? Tried recording a macro but the code is the same as for adding filters. Private Sub CommandButton4_Click() 'Command Button: "Add Filters" Application.ScreenUpdating = False Range("B3:I3").Select Selection.AutoFilter Application.ScreenUpdating = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Turn filters on in multiple sheets | Excel Programming | |||
Pivot Table filters, especially DATE filters | Excel Worksheet Functions | |||
Filters, Subtotal & Intacted Results after the filters' Removal | Excel Discussion (Misc queries) | |||
Turn ON Autofilter Filters | Excel Programming | |||
Code to automatically turn on and turn off Track Changes | Excel Programming |