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: 80
Default remembering the same filtering criteria

Dear All,

I would like to know that is there any way of recording criteria when I filtered data. For example; A1,A2,A3,A4,A5,A6,A7,A8,A9,A10 and A11 I have this data such as Data,1,2,3,4,5,6,7,8,9,10. Now when I created auto filter as

ActiveSheet.Range("$A$2:$A$11").AutoFilter Field:=1, Criteria1:=Array("2", "3", "4", "5"), Operator:=xlFilterValues

And this criteria can be changed by the user anytime. Now for some reason sometimes I trigger a code which works under Function key(F8) and it refresh some data from the database. Just before it gets the data, it will show all data as :

ActiveSheet.Range("$A$1:$A$11").AutoFilter Field:=1

My problem is I want excel to remember criteria after I get the data from database and filter as I previously did. Is there anyway of doing it?

Thank you very much for the help
Baha
 
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
Filtering by three criteria including top ten value Thomp Excel Programming 1 April 17th 10 02:03 PM
Excel "remembering" sort criteria CalcTeacher Excel Discussion (Misc queries) 3 January 26th 10 06:40 PM
Autofilter Criteria not filtering when using NOW() bony_tony Excel Programming 16 August 26th 07 01:59 PM
Filtering by criteria Greg Snidow Excel Programming 2 November 16th 06 07:13 PM
Advanced Filtering criteria FinChase Excel Programming 1 October 21st 04 06:58 PM


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

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

About Us

"It's about Microsoft Excel"