View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
MarMo MarMo is offline
external usenet poster
 
Posts: 34
Default Add new workbook with new name

thanks guys ,
Thanks for the suggestions. I tried saving it ,and it works fine.
But it's not what i'm looking for. What i'm asking is propably not possible.

When Excel opens a new book it does not save the book in a normal way.
It opens a book with the default name "Book1.xls".
As i'm adding up to 6 new workbooks with VBA in an excel application , Excel
opens Book1.xls to Book6.xls
What i'd like to do is , when adding a new book to assign a name to the new
opened book without saving it directly.
It's probably a stupid idea , but i'd like to know if it's possible.
Maybe i should save the workbooks to some folder and let the user decide
what to do with it.

Any other suggestions are welcome.
MarMo


"MarMo" wrote in message
...
Hi there ,
To add a new workbook with VBA the code is a follows :
Workbooks.add
This opens a new workbook with the default name book1.xls

Is there a way to alter the name when adding a new workbook ?
I'd like to add the name through my VBA code when adding a new book.

Thanks for any replies
MarMo