Problem with autofilter...

jenrique.cerda

Board Regular
Joined
Sep 22, 2006
Messages
53
Hi, is there a way to set autofilter as on or of???

Something like Autofilter=False or true???

Thanks...
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
not really but you could have it turn on/off with the
ActiveCell.Offset(0, 0).Range("A1").AutoFilter
 
Upvote 0
but how does this works???
does it detects wether if the filter is tunred on or off???

I just need to save af file without the autofilter..... a user may save this file with the autofilter turned on but once i run my routine, there is a part that opens this file and has to save it turned off...
 
Upvote 0
Hi

You can kinda do it - assuming you cell with the autofilter is applied in is ("E7"), if you activate this line of code

Code:
 Range("e7").AutoFilter Field:=1

perhaps using a workbook or worksheet event, it set the autofilter back to "field 1" which is effectively resetting it.
 
Upvote 0
Hi,

May be something like..

Code:
If ActiveSheet.AutoFilterMode = True Then
    'your code here
Else
    'your code here
End If
 
Upvote 0

Forum statistics

Threads
1,213,563
Messages
6,114,332
Members
448,566
Latest member
Nickdozaj

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top