Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel VBA: How to read Autofilter selections 1

Status
Not open for further replies.

KenMcd4

Technical User
Feb 6, 2002
12
US
Does anyone know of a method in Excel VBA to read what the field selections are for the autofilter? I.e., what did the user select for autofilter field 1, field 2, etc.?
 
Hi KenMcd4,

There are easier things to interpret but the information is in the Worksheet's AutoFilter.Filters Collection. There should be one Filter object for each column and, if .On = True then the criteria properties will return the criteria.

Enjoy,
Tony
 
Thanks, Tony... I was able to read the autofilter settings using your suggestion. At least I could in Excel 2000, but I still have to see if it works in Excel 97 (which we still use where I work; that's where I really need it!)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top