Thread: Copy Method
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default Copy Method

Try this... You need to be a little more explicit with your references...

mySht.Range(mySht.Cells(5, 1), mySht.Cells(endRow, 1)).Copy

As a guess it can not resolve Cells...

HTH

"Rowan" wrote:

I was just wondering why this line of code works:

mySht.Range("A5:A" & endRow).Copy

while this one produces runtime error 1004

mySht.Range(Cells(5, 1), Cells(endRow, 1)).Copy

Regards
Rowan