Thread: vba copy code
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default vba copy code

Sub x10()
Dim COUNTER1 As Integer
Dim COUNTER2 As Integer

COUNTER1 = [A1]
COUNTER2 = [B1]


Range(Cells(COUNTER1, 1), Cells(COUNTER1, 71)).Copy _
Worksheets("SHEET2").Cells(COUNTER2, 1)

End Sub

--
Regards,
Tom Ogilvy

"Paul" wrote in message
...
this code is in sheet1; and the last line, before end sub,
produces an "application defined or object defined error".
can someone tell me why?

Sub x10()
Dim COUNTER1 As Integer
Dim COUNTER2 As Integer

COUNTER1 = [A1]
COUNTER2 = [B1]


Range(Cells(COUNTER1, 1), Cells(COUNTER1, 71)).Copy _
Worksheets("SHEET2").Range(Cells(COUNTER2, 1))

End Sub