Hi,
I have come across this before with copy paste.
It seems you can copy from any sheet you want, but you can only paste into the 
active worksheet.
Try this:

Worksheets("Sheet1").Cells(1, 1).Select
ActiveCell.EntireRow.Copy
Worksheets("Sheet2").Activate
Worksheets("Sheet2").Range(1, 1).EntireRow.Paste

Regards - Dave.

> Date: Sun, 30 Nov 2008 03:08:07 -0800
> Subject: $$Excel-Macros$$ Paste Error 1004
> From: [EMAIL PROTECTED]
> To: excel-macros@googlegroups.com
> 
> 
> Hi all,
> 
> This must be so easy but I cannot for the life of me figure out what
> is going wrong. All I want do do is copy an entire row from one sheet
> to another sheet in the same workbook. All my code works OK except the
> apparently simple task of copying and pasting between sheets.
> 
> The code below is essentially all I ned to do (except for all the
> preceeding code that decides why to copy this particular row).
> 
> Worksheets("Sheet1").Cells(1, 1).Select
> ActiveCell.EntireRow.Copy
> Worksheets("Sheet2").Range(1, 1).EntireRow.Paste
> 
> When I run this code I get an error 1004. If I step through the code
> the error is thrown for the last line.
> 
> Any pearls of wisdom?
> 
> Thanks in advance. CL.
> 
> > 

_________________________________________________________________
It's simple! Sell your car for just $40 at CarPoint.com.au
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fsecure%2Dau%2Eimrworldwide%2Ecom%2Fcgi%2Dbin%2Fa%2Fci%5F450304%2Fet%5F2%2Fcg%5F801459%2Fpi%5F1004813%2Fai%5F859641&_t=762955845&_r=tig_OCT07&_m=EXT
--~--~---------~--~----~------------~-------~--~----~
Visit the blog to download Excel tutorials at 
http://www.excel-macros.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/excel-macros?hl=en

Visit & Join Our Orkut Community at 
http://www.orkut.com/Community.aspx?cmm=22913620

Visit the blog to download Excel tutorials at 
http://www.excel-macros.blogspot.com

To Learn VBA Macros Please visit http://www.vbamacros.blogspot.com

To see the Daily Excel Tips, Go to:
http://exceldailytip.blogspot.com
-~----------~----~----~----~------~----~------~--~---

Reply via email to