ExcelBanter

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

Connie

Autofilter
 
how can I (with VBA) turn off the Autofilter or turn on
the autofilter regardless of its current state?

DMeade

Autofilter
 
This works for me. ws represents a worksheet, since
AutoFilterMode is a worksheet property.

If ws.AutoFilterMode = True Then
ws.AutoFilterMode = False
End If

Diane
-----Original Message-----
how can I (with VBA) turn off the Autofilter or turn on
the autofilter regardless of its current state?
.


Connie

Autofilter
 
Thank you.

I tried
ActiveSheet.AutoFilterMode = False which seems to work OK
but when I try
ActiveSheet.AutoFilterMode = True it never works.

Can you tell what I'm doing wrong?

Thanks again,

Connie

-----Original Message-----
This works for me. ws represents a worksheet, since
AutoFilterMode is a worksheet property.

If ws.AutoFilterMode = True Then
ws.AutoFilterMode = False
End If

Diane
-----Original Message-----
how can I (with VBA) turn off the Autofilter or turn on
the autofilter regardless of its current state?
.

.


Dave Peterson[_3_]

Autofilter
 
You can turn it off that way, but you have to autofilter a range.

Record a macro and you'll see the code.



Connie wrote:

Thank you.

I tried
ActiveSheet.AutoFilterMode = False which seems to work OK
but when I try
ActiveSheet.AutoFilterMode = True it never works.

Can you tell what I'm doing wrong?

Thanks again,

Connie

-----Original Message-----
This works for me. ws represents a worksheet, since
AutoFilterMode is a worksheet property.

If ws.AutoFilterMode = True Then
ws.AutoFilterMode = False
End If

Diane
-----Original Message-----
how can I (with VBA) turn off the Autofilter or turn on
the autofilter regardless of its current state?
.

.


--

Dave Peterson



All times are GMT +1. The time now is 11:54 PM.

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