advanced filternot working in macro

T

tina

Hi
A macro with advanced filter is nolonger working the advance filter does not
give any data but if run manually with sames settings it works. Problem
seems to been since upgraded to office 2007 . I recorded a amcro for filter
and ran this and this failed to give data when macro ran but did when recorded
relevant code is
Range("MYCODES").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("I1:I2"), CopyToRange:=Range("K1"), Unique:=False
any Ideas
Thanks Tina
 
J

Joel

The ranges are probably referencing the wrong worksheet. The n amed Range is
probably ok, but the criteria range and copyto range are refering the
activeworksheet. the activesheet may be incorrect.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top