Microsoft KB Archive/185002

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

Article ID: 185002

Article Last Modified on 6/23/2005

-

APPLIES TO


 * Microsoft Excel 97 Standard Edition

-



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.

