ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   default name for a new book (https://www.excelbanter.com/excel-programming/272819-default-name-new-book.html)

gerard Genevois

default name for a new book
 

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!

Dave Peterson[_3_]

default name for a new book
 
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#".



gerard Genevois wrote:

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!


--

Dave Peterson


Abdul Salam

default name for a new book
 
I think this is what you are looking for:

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

End Sub

Abdul Salam

-----Original Message-----

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


gerard Genevois

default name for a new book
 


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!


All times are GMT +1. The time now is 01:59 AM.

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