Change default new excel workbook name from "Book1"

Change default new excel workbook name from "Book1"

Is there a way in Excel to modify the default name of a newly created workbook from Book1, Book2 etc., ideally via VBA? AFAIK this follows the PC regional/language settings so it is defined somewhere.

I am aware that to change a workbook's name, it is necessary to "SaveAs" it, however I do not want to change the name, I want it to be set to that name already in the moment the workbook is created.

答案1

It seems that you can't change the workbook name without saving the file.

From the Microsoft docs:

The Name property returns the workbook name. You cannot set the name by using this property; if you need to change the name, use the SaveAs method to save the workbook under a different name.

source: https://docs.microsoft.com/en-us/office/vba/api/excel.workbook#:~:text=The%20Name%20property%20returns%20the,workbook%20under%20a%20different%20name.

相关内容