View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alan[_8_] Alan[_8_] is offline
external usenet poster
 
Posts: 117
Default Copy/Paste Problem: Runtime error 1004

I am copying and pasting some entries (entire rows, one at a time)
from one worksheet (NewDataWS) to another worksheet (ErrorWS) in the
same workbook. This code works fine:

NewDataWS.Cells(i, FirstNameCol).EntireRow.Copy
ErrorWS.Paste Destination:=ErrorWS.Range("A" & ErrorRow)

I want to place another value (not in the source row) in the
destination worksheet for each row, as I process it. However, when I
change the second line to start at Column "B", like below:

ErrorWS.Paste Destination:=ErrorWS.Range("B" & ErrorRow)

I get the following runtime error:

"Runtime error 1004
The information cannot be pasted because the Copy area and the paste
area are not the same size and shape. . . . "

Since I am just specifying the starting cell, I do not understand
why I get this. Do you?

Thanks in advance, Alan