Excel VBA: Renaming a workbook

B

Bob Phillips

You could do a SaveAs with the new name, then Kill the old name.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Vasant Nanavati said:
You can't. You have to save it with the desired name.
 
V

Vasant Nanavati

True, Bob. And there wouldn't even be an old name to kill if the workbook
was just created. I just thought the OP was asking for some way of renaming
the workbook in memory without saving it, similar to renaming a worksheet.

--

Vasant


Bob Phillips said:
You could do a SaveAs with the new name, then Kill the old name.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
L

Lazer

Yes, Vasant, that is exactly what I was asking: How to change
Workbook from "Book1" to "My Own Name for My Workbook".

Thanks,
Elieze
 
V

Vasant Nanavati

As I said, there is no efficient way of doing this. You would need to save
it under the new name at least once for the new name to "take".
 
B

Bob Phillips

Hi Vasant,

I agree, just trying to be creative in providing a solution.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top