LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 573
Default Won't accept range name

I'm trying to apply an advanced filter to a named range called
"FilterRange" on the source worksheet (RecSht).

RecSht.Select
Range("a1").Select
'Selection.CurrentRegion.Select
Set FilterRange = Selection.CurrentRegion

CtyExtr.Select
RecSht.Range(FilterRange).AdvancedFilter Action:= _
xlFilterCopy, CriteriaRange:=RecSht.Range("aa1:aa2"), _
CopyToRange:=Range("A5"), Unique:=False

I tried using a named range, but it seems that macros don't recognize a
named range, at least I can't get it to. So I created a variable to
represent the current region from cell A1, called FilterRange. The
macro doesn't like that either! No matter what different variations of
syntax I use, the macro won't accept it. Right now I'm getting the
"Application defined or object defined error". FilterRange is dimmed as
an object. Any ideas?
Thanks for the help!

 
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
Accept or Reject a value crabflinger Excel Worksheet Functions 1 April 3rd 09 05:46 PM
Track/Accept Changes WhOkNoWs Excel Worksheet Functions 0 August 22nd 07 02:26 PM
license box accept sherrysue11 Excel Discussion (Misc queries) 0 July 20th 06 02:42 PM
How do i get pocket Excel to accept the normal range of formulae? [email protected] Excel Discussion (Misc queries) 0 October 28th 05 07:37 AM
Won't accept sheet name davegb Excel Programming 9 May 17th 05 03:26 PM


All times are GMT +1. The time now is 12:40 AM.

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

About Us

"It's about Microsoft Excel"