Ivan has attended:
Excel VBA Intro Intermediate course
VBA
How do you copy data from one workbook and paste into a different workbook using macro?
RE: VBA
Hi Ivan
The way to copy data between 2 workbooks is to have both workbooks open at the time.
So from Workbook1 you need to open Workbook2. To do this:
ChDir "C:\"
Workbooks.Open Filename:="C:\My Doduments\Workbook2.xls
You then indicate which data is to be copied and where it is to be pasted.
When the copy and paste has been done you close Workbook 2 as follows:
.
Windows("Workbook2.xls").Activate
ActiveWorkbook.Save
ActiveWorkbook.Close
Hope this helps
Carlos