Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default advanced filternot working in macro

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default advanced filternot working in macro


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Advanced Filter not working correctly in macro Tara H Excel Programming 9 January 28th 09 08:06 PM
Very simple Advanced Filter not working in macro Adam Excel Programming 4 December 18th 08 12:16 PM
Advanced autofilter not working in macro Nirmal Excel Discussion (Misc queries) 3 January 6th 07 12:30 AM
Advanced Filter not working babypenquin Excel Worksheet Functions 1 June 22nd 06 05:48 PM
Advanced Filter Not Working Cthulhu Excel Discussion (Misc queries) 2 May 10th 05 07:24 PM


All times are GMT +1. The time now is 05:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"