how to copy contents of workbook 1 to workbook 2 ?
how to copy contents of workbook 1 to workbook 2 ?
Malcolm posted the following snippet the other day:
[vba]Sub macro1()
Workbooks.Open Filename:="your source file.xls"
ActiveWorkbook.SaveAs "C:\your target file.xls"
End Sub
[/vba]
This should take care of the job for you.
HTH,
Ron
Windermere, FL
Thanks a lot Ron.
but if you want to stay in the original workbook
[VBA] Sub macro1()
Workbooks.Open Filename:="your source file.xls"
ActiveWorkbook.SaveCopyAs "C:\your target file.xls"
End Sub [/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'