Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding New Woıkbook with a specific name

We want to add a new workbook in the VB but with a
specific name. We know to use "Workbooks.Add" command
but do not know how to specify name. We also can solve
it with save as as soon as we add it. But want to know
if there is a single command to do that.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Adding New Woıkbook with a specific name

Try this

Dim wb As Workbook
Set wb = Workbooks.Add
wb.SaveAs "C:\test.xls"


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Tolga & Hande" wrote in message ...
We want to add a new workbook in the VB but with a
specific name. We know to use "Workbooks.Add" command
but do not know how to specify name. We also can solve
it with save as as soon as we add it. But want to know
if there is a single command to do that.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Adding New Woıkbook with a specific name

Hi Tolga & Hande,

Saving the workbook is the only way to name it. You can do it in one
statement if you'd like:

Workbooks.Add.SaveAs "C:\test.xls"

--
Regards,

Jake Marx
www.longhead.com


Tolga & Hande wrote:
We want to add a new workbook in the VB but with a
specific name. We know to use "Workbooks.Add" command
but do not know how to specify name. We also can solve
it with save as as soon as we add it. But want to know
if there is a single command to do that.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Only adding up specific categories [email protected] Excel Discussion (Misc queries) 5 October 23rd 06 09:32 PM
Adding numbers from a list over a specific value Herd96 Excel Discussion (Misc queries) 4 May 15th 06 02:21 PM
Adding specific cells in column MG Excel Worksheet Functions 1 February 23rd 06 10:09 PM
adding specific cells Shooter Excel Worksheet Functions 1 January 23rd 06 04:42 PM
Adding specific Cells Only. Lost at Sea Excel Discussion (Misc queries) 2 August 22nd 05 08:04 PM


All times are GMT +1. The time now is 05:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"