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: 8
Default Range.Copy (Destination)

Hi

Can someone please explain where I'm going wrong with this simple two line
chunk of code?

B7 is the currently selected cell on the active sheet.

I've assigned the cell reference for D10 to a variable named copycell by
using the following line:

Let copycell = Selection.Offset(3,2).Address(False,False)

All I want to be able to do is copy the contents of D10 (an = sum() formula)
to E10 using the Range.Copy ([Destination]) method but if I use Range
(copycell).Copy (Range(copycell).Offset (0,1)) it returns Run Time Error
1004 (Copy method of Range class failed).

However, if I use a range object offset from the current cell (B7) as the
destination i.e. Range (copycell).Copy (Selection.Offset (3,3)) it pastes
the relative formula from D10 into E10 as required.

What am I doing wrong?

Thanks for any suggestions.

Garry Douglas

** Please Remove SPMOFF To 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
Range.Copy [Destination] should not use clipboard Ming[_2_] Excel Discussion (Misc queries) 0 October 1st 09 11:13 PM
Using copy and destination formatting Jeff S.[_2_] Excel Discussion (Misc queries) 6 August 18th 09 11:24 AM
VBA .copy destination jerredjohnson Excel Discussion (Misc queries) 2 July 18th 06 11:18 PM
.Copy Destination:= .PasteSpecial ??? myBasic[_2_] Excel Programming 2 November 12th 04 10:11 AM
Selection.Copy Destination:= Mike Fogleman Excel Programming 3 January 10th 04 02:18 AM


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