Setting Workbook Name by VBA

  • Thread starter Reinhard F. Bentrup
  • Start date
R

Reinhard F. Bentrup

I'm adding Workbooks via VBA and want to assign a specific Workbook name (to
simplify for the user to identify the different workbooks). But the Workbook
Object "Name" is Read Only so I can't change the default name.

Any idea how to solve the problem?

Thanks & regards,
Reinhard
 
C

Chip Pearson

Reinhard,

The name of a new workbook is assigned when it is created (e.g.,
Book1), and can be changed only by doing a SaveAs. That is to
say, the name of a workbook is the file name of the workbook. If
you want to change the name of a workbook, you must do a SaveAs.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Top