Microsoft KB Archive/183132

= XL98 Err Msg: "Name Conflicts with Existing Module" =

Article ID: 183132

Article Last Modified on 9/11/2002

-

APPLIES TO


 * Microsoft Excel 98 for Macintosh

-



This article was previously published under Q183132



SYMPTOMS
In the Visual Basic Editor in Microsoft Excel 98 Macintosh Edition, 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



CAUSE
This behavior occurs when both projects have the same name.



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

Method 1
 In the Project window in the Visual Basic Editor, look at the projects that are listed. You should see entries similar to the following

 (Workbook1)

 (Workbook2)

 (Workbook3)

where  is the name of the project. Click the entry for the project that you want to rename. On the Tools menu, click  Properties

where  is the name of the project.</li> Click the General tab.</li> In the Project Name box, type a new, unique project name.

NOTE: Do not use a project name that you use in any other workbook.</li> Click OK.</li> On the File menu, click Save, where is the name of the workbook you modified.</li> Repeat steps 1 through 7 for all open workbooks that contain Visual Basic modules, class modules, or Userforms.</li></ol>

Method 2
<ol> In the Project window in the Visual Basic Editor, look at the projects that are listed. You should see entries similar to the following

<VBAProject> (Workbook1)

<VBAProject> (Workbook2)

<VBAProject> (Workbook3)

where <VBAProject> is the name of the project.</li> Click the entry for the project that you want to rename.</li> In the Properties window, in the box to the right of "(Name)," type a new, unique project name and press RETURN.

NOTE: Do not use a project name that you used in any other workbook.</li> On the File menu, click Save, where is the name of the workbook you modified.</li> Repeat steps 1 through 4 for all open workbooks that contain Visual Basic modules, class modules, or UserForms.</li></ol>

After you rename all projects with unique project names, the error message no longer appears when you create a reference.

<div class="moreinformation_section">

MORE INFORMATION
By default, when you create a new workbook in Microsoft Excel 98 Macintosh Edition, the project name for the new workbook is VBAProject. This naming convention may cause a problem if you attempt to create a reference from one project to another when you use the following steps:


 * 1) On the Tools menu, click References.
 * 2) In the list of Available References, click to select the check box for a project in another workbook.
 * 3) Click OK.

If you receive the error message when you click OK, you must change the name of one or more of your projects. Projects with the same name cannot reference each other.

<div class="references_section">