Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

XL2000: Error Message: Name Conflicts with Existing Module, Project, or Object Library


View products that this article applies to.

This article was previously published under Q213595

↑ Back to the top


Symptoms

In the Visual Basic Editor in Microsoft Excel 2000, when you attempt to create a reference from one project to another project, you may receive the following error message:
Name conflicts with existing module, project, or object library

↑ Back to the top


Cause

This behavior occurs when both projects have the same name.

↑ Back to the top


Resolution

To avoid this problem, rename the projects that have the same name. To do this, use one of the following methods.

Method 1

  1. In the Project Explorer pane in the Visual Basic Editor, look at the projects that are listed. You should see entries similar to the following
    VBAProject (Book1.xls)
    VBAProject (Book2.xls)
    VBAProject (Personal.xls)
    where VBAProject is the name of the project.
  2. Click the entry for the project that you want to rename.
  3. On the Tools menu, click VBAProject Properties.
  4. Click the General tab.
  5. In the Project Name box, type a unique project name.

    NOTE: Do not use a project name that you use in any other workbook.
  6. Click OK.
  7. On the File menu, click Save bookname, where bookname is the name of the workbook you modified.
  8. Repeat steps 1-7 for all open workbooks that contain Visual Basic modules, class modules, or user forms.

Method 2

  1. In the Project Explorer pane in the Visual Basic Editor, look at the projects that are listed. You should see entries similar to the following
    VBAProject (Book1.xls)
    VBAProject (Book2.xls)
    VBAProject (Personal.xls)
    where VBAProject is the name of the project.
  2. Click the entry for the project that you want to rename.
  3. In the Properties pane, in the box to the right of "(Name)", type a unique project name and press ENTER.

    NOTE: Do not use a project name that you use in any other workbook.
  4. On the File menu, click Save bookname, where bookname is the name of the workbook you modified.
  5. Repeat steps 1-4 for all open workbooks that contain Visual Basic modules, class modules, or user forms.
After you rename all projects with unique project names, the error message no longer appears when you create a reference.

↑ Back to the top


More information

By default, when you create a new workbook in Microsoft Excel 2000, the project name for the new workbook is "VBAProject" (without the quotation marks). This naming convention may cause a problem if you attempt to create a reference from one project to another with the same project name.

↑ Back to the top


References

For more information about how to change project names in Microsoft Excel 2000, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type Set Project Properties in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

↑ Back to the top


Keywords: KB213595, kbprogramming, kbprb, kberrmsg

↑ Back to the top

Article Info
Article ID : 213595
Revision : 6
Created on : 10/11/2006
Published on : 10/11/2006
Exists online : False
Views : 286