View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Scripting Autofilters..

No, you apply a filter to a range.

Dim aFilt as Autofilter
Range("A1").CurrentRegion.AutoFilter Field:=1, Criteria1:="C"
set aFilt = Activesheet.AutoFilter

However, the aFilt is an autofilter *object*. You can use it to examine
what the current settings of the items in the Filters collection are, but to
set those filters, you use the autofilter *method* of the range object.

--
Regards,
Tom Ogilvy


"mark" wrote in message
...
I've been working with scripting an autofilter.

It appears to me that to apply filters, etc, you need to do that from the
range object's autofilter property.

I had thought you would be able to dimension an object as an autofilter,

set
that object to an autofilter, and then work through that.

Is that incorrect?