What is run-time error '32813'?

prabha_friend

Board Regular
Joined
Jun 28, 2011
Messages
95
What is Run-time error '32813'

'Name conflicts with existing module, project, or object library'

When it will occur normally?

Why it is occuring to me now?

How come I am able to set the Reference Manually with the same scenario?

What is the solution?

The occurs in the following statement:
Code:
Application.VBE.ActiveVBProject.References.AddFromFile ThisWorkbook.Path & "\" & ThisWorkbook.Name

Thanks in Advance.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
THE ERROR SAYS You are trying to import a module file into a VBA project and either the module name in the file or one of the components in the file (Function/Sub Class) has the same name as an item already in the project

Infact you seem to be trying to load the spreadsheet into your project of which your project is part
ThisWorkbook.Path & "\" & ThisWorkbook.Name

addfromfile would expect something LIKE
Application.VBE.ActiveVBProject.References.AddFromFile "c:\temp\FileRoutines.bas"
 
Upvote 0

Forum statistics

Threads
1,223,992
Messages
6,175,822
Members
452,672
Latest member
missbanana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top