ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Changing the name of a workbook without saving it (https://www.excelbanter.com/excel-programming/343986-changing-name-workbook-without-saving.html)

Maury Markowitz

Changing the name of a workbook without saving it
 
The dox state that the .Name propery is read/write, but when I try to...

ActiveWorkbook.Name = "MyBook"

I get an error stating it's read-only. Sigh.

Is there any way to name the book without saving? I'm creating the book to
be e-mailed as an attachment, that part works but it goes out as "Book1" or
whatever.

Maury

Ron de Bruin

Changing the name of a workbook without saving it
 
Hi

You must save it, but you can delete it after that.

Try this
http://www.rondebruin.nl/mail/folder1/mail1.htm
Example 2

Or with Outlook
http://www.rondebruin.nl/mail/folder2/mail1.htm


Or use my Add-in
http://www.rondebruin.nl/mail/add-in.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Maury Markowitz" wrote in message
...
The dox state that the .Name propery is read/write, but when I try to...

ActiveWorkbook.Name = "MyBook"

I get an error stating it's read-only. Sigh.

Is there any way to name the book without saving? I'm creating the book to
be e-mailed as an attachment, that part works but it goes out as "Book1" or
whatever.

Maury




chijanzen

Changing the name of a workbook without saving it
 
Try it

ActiveWorkbook.SaveAs Filename:="C:\MyBook"

--
http://www.vba.com.tw/plog/


"Maury Markowitz" wrote:

The dox state that the .Name propery is read/write, but when I try to...

ActiveWorkbook.Name = "MyBook"

I get an error stating it's read-only. Sigh.

Is there any way to name the book without saving? I'm creating the book to
be e-mailed as an attachment, that part works but it goes out as "Book1" or
whatever.

Maury



All times are GMT +1. The time now is 06:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com