Thread: Copy Error
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Copy Error


Line... "Set r = .Cells(Rows.Count, 1).End(xlUp).Row"

Should be... Set r = .Cells(.Rows.Count, 1).End(xlUp)
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Suzanne"
wrote in message
I'm still not getting consistent paste results with code I've been trying to
work out, so I was looking to tighten up the copy formula, but am getting an
error message.

Dim r As Range, r1 As Range
With Worksheets("IHSF DATA ENTRY") ' the source, columns a-j
Set r = .Cells(Rows.Count, 1).End(xlUp).Row
End With
With Worksheets("MERGE DATA IHSF") ' the destination; columns d-m
Set r1 = .Range("D2").CurrentRegion
r1.Offset(1, 0).Copy r(2)
End With
Thanks... suzleigh