Need help i moving one worksheet to another

  • Thread starter Thread starter psk
  • Start date Start date
P

psk

Hi,
I need help in copying two worksheets in different workbooks into on
workbook with two sheets .

Example
report1.xls has one sheet name report1
report(1) .xls has one sheet name report1(1)

i want to move this two into one workbook
name newexcel.xls with two sheets name report1 and report1(1)

Can anyone help me in writing the code ...

Thanks
Punith
 
assume newexcel.xls does not exist and the other two workbooks are open.

Workbooks("Report1.xls").Worksheets("report1").Copy
Workbooks("Report(1).xls").Worksheets("report1(1)").Copy _
After:=Activeworkbook.worksheets(1)
ActiveWorkbook.SaveAs Filename:="C:\MyFolder\newexcel.xls"
 

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

Back
Top