To avoid this problem, rename the projects that have the same name. To do
this, use one of the following methods.
Method 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. - Click the entry for the project that you want to rename.
- On the Tools menu, click VBAProject Properties.
- Click the General tab.
- In the Project Name box, type a unique project name.
NOTE: Do not use a project name that you use in any other workbook.
- Click OK.
- On the File menu, click Save bookname, where bookname is the name of the workbook you modified.
- Repeat steps 1-7 for all open workbooks that contain Visual Basic modules, class modules, or user forms.
Method 2
- 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.
- Click the entry for the project that you want to rename.
- 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.
- On the File menu, click Save bookname, where bookname is the name of the workbook you modified.
- 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.