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: 5
Default Range.Copy only works with a named destination parameter?

Having an odd problem with the Range.Copy method.

This code:

Set source= Range("VL_Source")
Set target = VL.Offset(1).Resize(1, 1)
source.Copy Destination:=target

works fine. However the same thing with positional parameter:

Set source= Range("VL_Source")
Set target = VL.Offset(1).Resize(1, 1)
source.Copy (target)

fails with the error-

Run-time error '1004':
Copy methid of Raneg class failed

As far as I can see they mean exactly the same thing (source and target are
both declared as type Range). Any idea why this happens?

Regards; Colin
 
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
Range.Copy [Destination] should not use clipboard Ming[_2_] Excel Discussion (Misc queries) 0 October 1st 09 11:13 PM
How do I prevent copy and pasting into a selected range of a works oasalako1 Excel Discussion (Misc queries) 1 November 20th 07 01:29 PM
Offset Function works in cell, not in named range DragonslayerApps Excel Worksheet Functions 0 July 25th 05 04:39 PM
Range.Copy (Destination) Garry Douglas Excel Programming 3 January 3rd 05 03:02 PM
Problem with named range as VBA macro parameter Ken[_11_] Excel Programming 4 March 5th 04 02:16 PM


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