XL97: "Run-Time Error '32813'" When Creating Reference to the Solver Add-in (185002)



The information in this article applies to:

  • Microsoft Excel 97 for Windows

This article was previously published under Q185002

SYMPTOMS

When you run a Visual Basic for Applications macro that creates a reference to the Solver add-in, you may receive the following error message:
Run-time error '32813':
Name conflicts with existing module, project, or object library

CAUSE

This will happen if the following are true:
  • You are using the Application object for the VBE and ActiveVBProject properties to add the reference to the Solver add-in. -and-

  • You are opening the Solver add-in workbook.

WORKAROUND

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
To work around the problem, do not explicitly open the Solver add-in.
 Sub auto_open()

   Dim solverpath As String

   ' Get the path to the Solver add-in.
   solverpath = Application.LibraryPath & "\solver\solver.xla"

   ' Create a reference to the Solver add-in
   ThisWorkbook.VBProject.References.AddFromFile solverpath

 End Sub
				

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem no longer occurs in Microsoft Excel 2000.

REFERENCES

For more information about using references, click the Office Assistant in the Visual Basic Editor, type references, click Search, and then click to view "Set a Reference to a Type Library."

NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If Microsoft Help is not installed on your computer, please see the following article in the Microsoft Knowledge Base:

120802 Office: How to Add/Remove a Single Office Program or Component


Modification Type:MajorLast Reviewed:6/23/2005
Keywords:kbprb KB185002