ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Remove Autofilter (https://www.excelbanter.com/excel-programming/406491-remove-autofilter.html)

Dr. Schwartz[_2_]

Remove Autofilter
 
I would like to turn off the auto filter in sheet3. I can use:

Sheet3.Cells.AutoFilter

to toggle it on and off. I want to make sure that it is off before I run my
code. Can anyone help me determine the autofilter status? And then if it is
on then turn it off.

Thanks
The Doctor

michael.beckinsale

Remove Autofilter
 
On 22 Feb, 09:26, Dr. Schwartz
wrote:
I would like to turn off the auto filter in sheet3. I can use:

Sheet3.Cells.AutoFilter

to toggle it on and off. I want to make sure that it is off before I run my
code. Can anyone help me determine the autofilter status? And then if it is
on then turn it off.

Thanks
The Doctor


..AutoFilterMode =False

[email protected]

Remove Autofilter
 
Hi
As well as .AutoFiltermode = False you might also throw in

On Error Resume Next 'required if Advanced filter used
.ShowAllData
On Error GoTo 0

incase Advanced filter has been applied.

regards
Paul

On Feb 22, 9:39*am, "michael.beckinsale"
wrote:
On 22 Feb, 09:26, Dr. Schwartz
wrote:

I would like to turn off the auto filter in sheet3. I can use:


Sheet3.Cells.AutoFilter


to toggle it on and off. I want to make sure that it is off before I run my
code. Can anyone help me determine the autofilter status? And then if it is
on then turn it off.


Thanks
The Doctor


.AutoFilterMode =False



Dr. Schwartz[_2_]

Remove Autofilter
 
Thank you Michael - simple yet perfect!

The Doctor

"michael.beckinsale" wrote:

On 22 Feb, 09:26, Dr. Schwartz
wrote:
I would like to turn off the auto filter in sheet3. I can use:

Sheet3.Cells.AutoFilter

to toggle it on and off. I want to make sure that it is off before I run my
code. Can anyone help me determine the autofilter status? And then if it is
on then turn it off.

Thanks
The Doctor


..AutoFilterMode =False



All times are GMT +1. The time now is 09:34 AM.

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