Copying sheet to another workbook

E

EM

Hi there,
just beginning to learn excel and VBA. Yhat's why so basic question. Didn't
find any help in couple of forums or previous posts here....

I'm trying to copy data from Myyjat.xls , Sheet Source, Range A1:D65 to
Kaupat.xls, Sheet Code where there is the first free row.
When I practiced this copying in the same workbook, it went all right, but
now I can't make it work...
Any hint what I'm doing wrong.

Both workbooks are open...

Sub CopyTest()
Workbooks("Myyjat.xls").Sheets("Source").Range("A1:D65").Copy_Destination:=W
orkbooks("Kaupat.xls").Sheets("Data").Range("A65536").End(xlUp).Offset(1, 0)
End Sub

Thanks, if anyone....

-e-
 
R

R.VENKATARAMAN

what is the underscore between <copy> and <destination>
try to give space there if both lines are in the same line.

if the underscore is for the nextline then for next line the code is <
space (and) underscore
firstline _
secondline
 

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