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: 12
Default Run-time error 1004 Method "Range of object_global failed

XL 2003. Win XP
I am using a version of Jon Walkenbach's code to produce a unique
collection that populates another workbook with the items in the
"NoDupes" list. My issue is with the first step setting the Range
allcells. My range is not large but not continuous either and due to
the nature of my workbook I want the No Dupes list to be in the order I
dictate. Here is the beginning of my code:

dim allcells as range

Set allcells = Range("B3,B6,B9,B12,B15,B18,B21,B24" _
& "C3,C6,C9,C12,C15,C18,C21,C24,D3,D6,D9,D12,D15,D18 ,D21,D24" _
& "E3,E6,E9,E12,E15,E18,E21,E24,F3,F6,F9,F12,F15,F18 ,F21,F24" _
& "G3,G6,G9,G12,G15,G18,G21,G24,H3,H6,H9,H12,H15,H18 ,H21,H24" _
& "I3,I6,I9,I12,I15,I18,I21,I24,J3,J6,J9,J12,J15,J18 ,J21,J24" _
& "K3,K6,K9,K12,K15,K18,K21,K24,L3,L6,L9,L12,L15,L18 ,L21,L24" _
& "M3,M6,M9,M12,M15,M18,M21")

When I run this I get a run-time error 1004, method range of
object_global failed.

I can break this range down into smaller chunks and the Set allcells
line works fine, which leads me to wonder if there is a limit I can set
the range?

I've tried to use a union statement to pull two separate ranges
together but I still got a error.

Interestingly if I reorder the range to Range ("B3:M3,B6:M6"... etc) I
have no problem.

Can anyone suggest how I might overcome this please and as a learning
step for me explain where I've gone wrong?

Many thanks for your help

Simon

 
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
Run-time error '1004': AutoFill method of Range class failed murkaboris Excel Discussion (Misc queries) 3 April 14th 09 10:35 PM
Run-time error "1004" Select method of range class failed Tallan Excel Discussion (Misc queries) 3 March 7th 07 05:22 PM
Run-time error '1004': Method 'Range' of object '_Global' failed Neild Excel Programming 0 February 12th 06 11:43 PM
"Run-time error '1004'" Method 'Range' of object '_global' failed. haisat[_2_] Excel Programming 0 October 20th 03 12:13 PM


All times are GMT +1. The time now is 03:47 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"