PDA

View Full Version : Advanced filter question



malik641
12-12-2005, 08:50 AM
Hey guys (and gals) :)

In VBA, does the criteria for advanced filtering ALWAYS need a range...or is there a way I can define "Field Name" and "Value (for the field name)" without using a range?

I'm asking because I'm creating a userform to perform the advanced filtering and I don't want to have to write the field names and values to cells and then use that range for the criteria.

TIA

Bob Phillips
12-12-2005, 11:28 AM
Hey guys (and gals) :)

In VBA, does the criteria for advanced filtering ALWAYS need a range...or is there a way I can define "Field Name" and "Value (for the field name)" without using a range?

I'm asking because I'm creating a userform to perform the advanced filtering and I don't want to have to write the field names and values to cells and then use that range for the criteria.

TIA

WOuld have thought so, the argument is called CriteriaRange, and it is a worksheet facility.

malik641
12-12-2005, 02:25 PM
That's what I figured. But when I think about how it works, it requires a field name and a value...why not be able to manually program it in http://vbaexpress.com/forum/images/smilies/102.gif?


This may be a dead-end...but we'll see http://vbaexpress.com/forum/images/smilies/045.gif

I'll see what research I can do (which I probably won't find much...if anything http://vbaexpress.com/forum/images/smilies/090.gif )