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 Type mismatch on range name

I've been running the following code in a previous macro, and it ran
fine. the only things I've changed a
1. Changed from specifying the worksheet by name (was "In Care
Records", now have set that to a variable "RecSht" which is declared as
an object.

2. Changed the CopytoRange to specifically name the spreadsheet I want
the filtered data extracted to which is CtyExtr, declared as an object.


3. Changed the filter range from a specifed range on the sheet (i.e.,
"A1:G1000" to a named range "FilterRange". I'm getting a type mismatch
error on the follwing:

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


Is this enough to figure out the problem? If not, I'll post the entire
code.
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
Type Mismatch error & subscript out of range error Jeff Wright[_2_] Excel Programming 3 May 14th 05 07:14 PM
Type mismatch teresa Excel Programming 1 December 14th 04 11:19 PM
Type mismatch in VBA LinEst function if range too large RyanVM[_16_] Excel Programming 4 August 10th 04 02:47 AM
Type Mismatch Rockee052[_60_] Excel Programming 4 March 7th 04 12:12 AM


All times are GMT +1. The time now is 10:40 PM.

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"