Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Only adding up specific categories | Excel Discussion (Misc queries) | |||
Adding numbers from a list over a specific value | Excel Discussion (Misc queries) | |||
Adding specific cells in column | Excel Worksheet Functions | |||
adding specific cells | Excel Worksheet Functions | |||
Adding specific Cells Only. | Excel Discussion (Misc queries) |