Creating a new workbook.

  • Thread starter Thread starter sungen99
  • Start date Start date
S

sungen99

This is my last and final problem.

I have already set up 3 different worksheets within one workbook. M
macros and stuff resides on the 4th sheet of that workbook.

I would like the macro to create a new workbook saved for that day bu
it would only have the first 3 pages saved. No reason for the clien
to see my fancy programming.

Can this be done?

Thanks again in advanc
 
Try this

Sub aa()
Dim wb As Workbook
Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Copy
Set wb = ActiveWorkbook
wb.SaveAs "C:\" & Format(Now, "dd-mm-yy h-mm-ss") & ".xls"
wb.Close False
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

Back
Top