XL97: How to Programmatically Change the Project Name Property (161214)
The information in this article applies to:
- Microsoft Excel 97 for Windows
This article was previously published under Q161214 SUMMARY
By default, when you open a new workbook in Microsoft Excel 97, the Name
property for the workbook project is "VBAProject" (without the quotation
marks). This naming convention may cause a problem if you manually or
programmatically attempt to create a reference from one project to another.
If you try to create a reference between two projects that have the same
Name property, you receive the following error message:
Name conflicts with existing module, project, or object library
You can change the Name property for a project in the Visual Basic Editor
Properties window in the Visual Basic Editor, or you can programmatically
change the Name property. This article provides sample macro code for
changing the Name property of a project.
REFERENCES
For more information about References, click the Index tab in Visual Basic
for Applications Help, type the following text
references, adding to project
and then double-click the selected text to go to the "References Command
(Tools Menu)" topic.
Modification Type: | Major | Last Reviewed: | 6/23/2005 |
---|
Keywords: | kbdtacode kbProgramming KB161214 |
---|
|