default name for a new book

  • Thread starter Thread starter gerard Genevois
  • Start date Start date
G

gerard Genevois

Hello,
My macro creates a new book. This new book comes automatically with a
default "book#". I would like to change automatically this name without
saving the file on the harddisk or without opening the dialog book
"save" or "save as".
Can't find the command.
thanks for your help
 
The workbook's name gets changed when you save it.

You could use a template when you create the new workbook and the name will look
like "mytemplate#".
 
I think this is what you are looking for:

Sub test()
Workbooks.Add
ActiveWindow.Caption = "My file"

End Sub

Abdul Salam
 
Tks for the reply.
It changes the name of the caption..... but when you open save as or
save.... it's still "book1" which appears....
 
Back
Top