BTW, the users are on MS Excel 2003 for an indeterminate amount of time...
@Combo, not sure if that will work for the scenario...but if it seems like it might, then I might need some clarification as to how this can be accomplished
@Skip, All worksheets contain data from the same source but each has data that has been filtered by a different set of criteria, true, BUT see below.
I just thought of this, tell me what you think...One hidden worksheet with one data connection that is re-used. The query runs, the data is refreshed, the results copied from the hidden worksheet to the visible one and then loop back through those steps another eight times. Because once the query is run and the data has been captured and copied to a worksheet that the users can manipulate, that query definition is no longer needed until they run the macro again (the sql for the query definition is already in the code soooo...).
To your "If so, how many fields/criteria variables?", don't even get me started...short of the long, I hope....Each set of criteria has to contain its own criteria and the opposite of the previous criteria in order to avoid selecting records that were previous selected...I'm only going to paste the last query's criteria so you get the gist...
Code:
"WHERE (AllData.Fund_Status<>'I') and (AllData.COA_Dist_Status<>'I') " & _
"AND (AllData.COA_Dist_Status<>'') and (AllData.Exception_Codes = '') " & _
"AND (AllData.Payout_Frequency<>'U') " & _
"AND (AllData.FDN_Fund_Code LIKE 'W%') AND (AllData.Priority_Num = 0) " & _
"and (AllData.Regents_Fund <>'A2001') " & _
"AND (AllData.Regents_Fund <>'A2002') AND (LEFT(AllData.Regents_Fund,3)<>'CAA') " & _
"AND (LEFT(AllData.Regents_Fund,2)<>'IH') " & _
"ORDER BY AllData.FDN_Fund_Code"
AllData is the named range on a worksheet that contains...you guessed it, all the data on the worksheet