I want to remove Autofilter from all sheets of my workbook. No matter whatever the ranges the sheet might have.
At present i m trying this...
But it does not remove for all... Please help.Please Login or Register to view this content.
I want to remove Autofilter from all sheets of my workbook. No matter whatever the ranges the sheet might have.
At present i m trying this...
But it does not remove for all... Please help.Please Login or Register to view this content.
which ones does it not remove from?
Hi ilyaskazi
Use AutoFilterMode
Sub test()
Dim curVis As Long
Dim sh As Worksheet
For Each sh In ThisWorkbook.Worksheets
With sh
curVis = .Visible
.Visible = xlSheetVisible
.AutoFilterMode = False
.Visible = curVis
End With
Next sh
End Sub
--
Regards Ron de Bruin
http://www.rondebruin.nl
"ilyaskazi" <[email protected]> wrote in message
news:[email protected]...
>
> I want to remove Autofilter from all sheets of my workbook. No matter
> whatever the ranges the sheet might have.
>
> At present i m trying this...
>
> Code:
> --------------------
> For Each sh In ActiveWorkbook.Worksheets
> ' Open hidden sheet
> If sh.Visible <> xlSheetVisible Then
> sh.Visible = True
> sh.EnableAutoFilter = False
> End If
> sh.EnableAutoFilter = False
> Next sh
> --------------------
>
> But it does not remove for all... Please help.
>
>
> --
> ilyaskazi
> ------------------------------------------------------------------------
> ilyaskazi's Profile: http://www.excelforum.com/member.php...o&userid=23969
> View this thread: http://www.excelforum.com/showthread...hreadid=401925
>
What does these all 3 option means actually??...
1- EnableAutoFilter
2- FilterMode
3- AutoFilterMode
Hi ilyaskazi
In the VBA editor select EnableAutoFilter or FilterMode or AutoFilterMode in the code
And press F1
You get all the information you need
--
Regards Ron de Bruin
http://www.rondebruin.nl
"ilyaskazi" <[email protected]> wrote in message
news:[email protected]...
>
> What does these all 3 option means actually??...
>
> 1- EnableAutoFilter
> 2- FilterMode
> 3- AutoFilterMode
>
>
> --
> ilyaskazi
> ------------------------------------------------------------------------
> ilyaskazi's Profile: http://www.excelforum.com/member.php...o&userid=23969
> View this thread: http://www.excelforum.com/showthread...hreadid=401925
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks