Add and name a new workbook (not worksheet)

Bagharmin

Board Regular
Joined
Nov 22, 2010
Messages
168
I found plenty of posts regarding naming/renaming a worksheet, but I couldn't find one that addressed how to create and name a new workbook. I tried some very simple code:

Code:
Workbooks.Add
    ActiveWorkbook.Name = "Combined Data"

However, Excel tells me that Name is a read-only property of ActiveWorkbook. How do I just name my new workbook? I know I can do ActiveWorkbook.SaveAs and give it a filename, but I'm not at the point in my code where I want to do that.

All help is greatly appreciated.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
As soon as you ADD a workbook, Excel gives it a name such as Book1, Book2, etc.
If you do not want to "give it a filename", what do you want to do?
 
Upvote 0
I don't want to save it (at least, not initially and maybe not at all), I just want to give the workbook a new name. Is there no way to do that without doing a SaveAs and specifying a filename?
 
Upvote 0
No, you can not "give the workbook a new name" without using "SaveAs and specifying a filename".
 
Upvote 0

Forum statistics

Threads
1,224,566
Messages
6,179,551
Members
452,927
Latest member
rows and columns

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top