ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Restoring Filter (https://www.excelbanter.com/excel-discussion-misc-queries/163558-restoring-filter.html)

peyman

Restoring Filter
 
In VBA, how can I restore filter before saving.I need a code by which
unfilter all the worksheet(if they are in filter mode)and then save the
workbook?
thanks

Pete_UK

Restoring Filter
 
You can just do:

Selection.AutoFilter

This will get rid of the filter pull-downs and restore any rows hidden
by the filter. However, if you don't have any filters on the sheet,
this will set them up.

Hope this helps.

Pete

On Oct 26, 12:30 am, peyman wrote:
In VBA, how can I restore filter before saving.I need a code by which
unfilter all the worksheet(if they are in filter mode)and then save the
workbook?
thanks





All times are GMT +1. The time now is 08:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com