Hey guys

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 through VBA code?

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