Thread: Copy Method
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rowan[_2_] Rowan[_2_] is offline
external usenet poster
 
Posts: 226
Default Copy Method

Thanks Jim, Bob

I was missing the fact that Cells refers to the activesheet only unless
referenced otherwise.

Regards
Rowan

"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