ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Rename a new workbook (https://www.excelbanter.com/excel-programming/334743-rename-new-workbook.html)

Jan Eric Nilsson

Rename a new workbook
 
Is it possible through VBA to create a new Workbook and also assign a given
name to the Workbook without having the Workbook saved?

Best Regards

Jan Eric



Norman Jones

Rename a new workbook
 
Hi Jan Eric,

A workbook's name is created when the workbook is saved, so this is not
possible.

The default new workbook name (usually "Book" and a numeric) can be altered
by changing (and saving) the (xlt) template file.

What is it that you are attempting to do and why do you find it necessary,
or desirable, to assign a name without saving the workbook?

---
Regards,
Norman



"Jan Eric Nilsson" wrote in message
...
Is it possible through VBA to create a new Workbook and also assign a
given name to the Workbook without having the Workbook saved?

Best Regards

Jan Eric




Bill Kuunders

Rename a new workbook
 
An example

ActiveWorkbook.SaveCopyAs "c:\backup\currb4roll.XLS"

Guessing you want to save a copy but keep on going with the existing old
file.

--
Greetings from New Zealand
Bill K

"Jan Eric Nilsson" wrote in message
...
Is it possible through VBA to create a new Workbook and also assign a
given name to the Workbook without having the Workbook saved?

Best Regards

Jan Eric





All times are GMT +1. The time now is 03:55 PM.

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