AutoFilter-criteria with VBA in XL07

  • Thread starter Thread starter stefan onken
  • Start date Start date
S

stefan onken

hi all,
Autofilter in XL2007 presents a unique list of items in the Autofilter-
Range.
using VBA, i want to get the checked items in this list.
I tried AutoFilter.Filters(1).Criteria1 and Criteria2 and got the
first 2 Criteria.
But how can i get the other Criteria ?


thanks
stefan
 
hi Ron,

thanks.
as far as i can see the code creates the unique list which i have in
the Autofilter dialog.
what i need are the checked items in the unique list in the autofilter
dialog.
an example: in A1 is a title, in A2:A6 1 to 5.
in the autofilter dialog, i have the list with 1 to 5 (and choose
all).
if i check one or two of these items in the list,
Sheets(1).AutoFilter.Filters(1).Criteria1 resp. Criteria2 return my
checked items.
if i check three or more items in the list, Criteria1 and Criteria2 can
´t be used (runtimeerror 13).

Looks a bit like MS has forgotten, that more than two Criteria are
possible in 2007.

stefan
 
2 is the max in 2007 also with code
Seems not to be possible to get the complete list from the AutoFilter dropdown or the ones that are checked.
I checked that last month but the answer was No



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




hi Ron,

thanks.
as far as i can see the code creates the unique list which i have in
the Autofilter dialog.
what i need are the checked items in the unique list in the autofilter
dialog.
an example: in A1 is a title, in A2:A6 1 to 5.
in the autofilter dialog, i have the list with 1 to 5 (and choose
all).
if i check one or two of these items in the list,
Sheets(1).AutoFilter.Filters(1).Criteria1 resp. Criteria2 return my
checked items.
if i check three or more items in the list, Criteria1 and Criteria2 can
´t be used (runtimeerror 13).

Looks a bit like MS has forgotten, that more than two Criteria are
possible in 2007.

stefan
 
thank you for confirming

many greetings from germany
(and by the way many thanks for your webpage, often linked in the
german XL-newsgroup)
stefan
 
Back
Top