Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() tina;557571 Wrote: 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 TinaSub test() 'In excel 2007 you have to refer to every object. There are no assumptions anymore 'Even if you are on the activesheet on which you want to perform an action, 'you'll have to refer to it in your coding. With ActiveWorkbook With .ActiveSheet Range("MYCODES").AdvancedFilter Action:=xlFilterCopy, _ CriteriaRange:=.Range("I1:I2"), CopyToRange:=.Range("K1"), Unique:=False End With End With End SubCharlize -- Charlize ------------------------------------------------------------------------ Charlize's Profile: http://www.thecodecage.com/forumz/me...hp?userid=1168 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=153796 Microsoft Office Help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Advanced Filter not working correctly in macro | Excel Programming | |||
Very simple Advanced Filter not working in macro | Excel Programming | |||
Advanced autofilter not working in macro | Excel Discussion (Misc queries) | |||
Advanced Filter not working | Excel Worksheet Functions | |||
Advanced Filter Not Working | Excel Discussion (Misc queries) |