ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   changing name of workbook (https://www.excelbanter.com/excel-programming/320678-changing-name-workbook.html)

inquirer

changing name of workbook
 
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



Norman Jones

changing name of workbook
 
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


---
Regards,
Norman



"inquirer" wrote in message
...
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





inquirer

changing name of workbook
 
Many thanks

Chris
"Norman Jones" wrote in message
...
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


---
Regards,
Norman



"inquirer" wrote in message
...
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








All times are GMT +1. The time now is 02:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com