Excel VBA: Renaming a workbook

  • Thread starter Thread starter Lazer
  • Start date Start date
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.
 
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)
 
Yes, Vasant, that is exactly what I was asking: How to change
Workbook from "Book1" to "My Own Name for My Workbook".

Thanks,
Elieze
 
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".
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top