ExcelBanter

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

moglione1[_11_]

VBA Autofilter
 

Hi all,

I am trying to autofilter on a worksheet but have trouble if th
autofilter is already on.

Basically what I want: If the autofilter is on then I would like t
turn if off, but if the filter is off then I would like to leave i
off.

I currently use selection.autofilter and have trouble with this; if th
autofilter is on it turns it off and if its off it turns it on. This i
causing massive issues with the rest of the macro running.

Please hel

--
moglione
-----------------------------------------------------------------------
moglione1's Profile: http://www.excelforum.com/member.php...fo&userid=2641
View this thread: http://www.excelforum.com/showthread.php?threadid=53837


Norman Jones

VBA Autofilter
 
Hi Moglione,

Try:

ActiveSheet.AutoFilterMode = False


---
Regards,
Norman



"moglione1" wrote
in message ...

Hi all,

I am trying to autofilter on a worksheet but have trouble if the
autofilter is already on.

Basically what I want: If the autofilter is on then I would like to
turn if off, but if the filter is off then I would like to leave it
off.

I currently use selection.autofilter and have trouble with this; if the
autofilter is on it turns it off and if its off it turns it on. This is
causing massive issues with the rest of the macro running.

Please help


--
moglione1
------------------------------------------------------------------------
moglione1's Profile:
http://www.excelforum.com/member.php...o&userid=26414
View this thread: http://www.excelforum.com/showthread...hreadid=538373





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

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