default name for a new book

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


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
D

Dave Peterson

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#".
 
A

Abdul Salam

I think this is what you are looking for:

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

End Sub

Abdul Salam
 
G

gerard Genevois

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....

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 

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

Top