LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Selection.AutoFilter Field:=1

Hi,
I need to turn off the auto filter option and ensure any filtered columns
are returned to non-filter state prior to running some VBA, at present I am
using Selection.AutoFilter Field:=1 and repeating it for each of the umpteen
columns. This looks rather messy and adds a lot of lines to code. I am
sure it can be scaled down to one line, however so far I haven't managed it.
I have tried a few ideas to no avail -

I'd appreciate any advice on this one,
Best Wishes,
Mickey

-------------------------------------------------------------------------
Currently Using -
Selection.AutoFilter Field:=1
Selection.AutoFilter Field:=2
Selection.AutoFilter Field:=3
Selection.AutoFilter Field:=4 etc.
-------------------------------------------------------------------------
Have tried -

Sub Macro2()
'
Selection.AutoFilter Field:=1, Field:=2, Field:=3, Field:=4, Field:=5,
Field:=6
End Sub
--------------------------------------------------------------------------
Sub autofilter_off()
With ActiveSheet
.EnableAutoFilter = True
End With
End Sub
-------------------------------------------------------------------------


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autofilter - 1000 Selection Limitation? JohnG Excel Discussion (Misc queries) 1 April 28th 09 03:16 AM
Chart Title Using Autofilter Selection Roger Charts and Charting in Excel 6 December 1st 08 01:59 PM
How do I save an autofilter selection as a new file? IrishLacey Excel Worksheet Functions 1 January 12th 07 08:26 PM
Paste into autofilter selection! HenrikB Excel Worksheet Functions 1 September 21st 06 09:29 AM
Selection.AutoFilter Field represented by "all" JeffFinnan Excel Programming 2 August 5th 03 04:17 PM


All times are GMT +1. The time now is 11:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"