changing name of workbook

  • Thread starter Thread starter inquirer
  • Start date Start date
I

inquirer

In vb code I create a new workbook which is given a name say "book22.xls".

How can I change the name of the workbook to say "reports_today.xls" so that
later I can call up this workbook by this name?

Thanks
Chris
 
Hi Inquirer,

Set the name directly when the workbook is opened:

Sub Tester()
Dim WB As Workbook

Set WB = Workbooks.Add

WB.SaveAs "reports_today.xls"

End Sub
 
Many thanks

Chris
Norman Jones said:
Hi Inquirer,

Set the name directly when the workbook is opened:

Sub Tester()
Dim WB As Workbook

Set WB = Workbooks.Add

WB.SaveAs "reports_today.xls"

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