ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to know Autofilter is on (https://www.excelbanter.com/excel-programming/346598-how-know-autofilter.html)

Who I Am

How to know Autofilter is on
 
I want to know how to know that the Autofilter is on, and how to turn
it off by code.

The data sheet I receive always has the Autofilter on. I want to see a
sheet without Autofilter on, so I can run Autofilter by code myself.

Thanks


Don Guillett[_4_]

How to know Autofilter is on
 

application.showall

--
Don Guillett
SalesAid Software

"Who I Am" wrote in message
oups.com...
I want to know how to know that the Autofilter is on, and how to turn
it off by code.

The data sheet I receive always has the Autofilter on. I want to see a
sheet without Autofilter on, so I can run Autofilter by code myself.

Thanks




Michel Pierron

How to know Autofilter is on
 
Hi Who I Am,

With ActiveSheet
If .AutoFilterMode Then .Cells.AutoFilter
End With

MP

"Who I Am" a écrit dans le message de news:
...
I want to know how to know that the Autofilter is on, and how to turn
it off by code.

The data sheet I receive always has the Autofilter on. I want to see a
sheet without Autofilter on, so I can run Autofilter by code myself.

Thanks




Dave Peterson

How to know Autofilter is on
 
with activesheet
If .AutoFilterMode Then
if .FilterMode then
.ShowAllData
End if
End If
end with

..autofiltermode checks to see if you have those visible arrows applied.
..filtermode checks to see if you're actually filtering any of the columns.

If you want to remove the arrows so you can reapply data|filter|autofilter where
you want it:

activesheet.autofiltermode = false

It removes the arrows. And it won't hurt if there are no arrows applied.

Who I Am wrote:

I want to know how to know that the Autofilter is on, and how to turn
it off by code.

The data sheet I receive always has the Autofilter on. I want to see a
sheet without Autofilter on, so I can run Autofilter by code myself.

Thanks


--

Dave Peterson


All times are GMT +1. The time now is 07:37 PM.

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