vba copy code

P

Paul

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
 
T

Tom Ogilvy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top