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

ID: Q185002


The information in this article applies to:
  • Microsoft Excel 97 for Windows


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, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals 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 needs. If you have limited programming experience, you may want to contact a Microsoft Certified Solution Provider or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Solution Providers, please see the following page on the World Wide Web:

http://www.microsoft.com/mcsp/
For more information about the support options available from Microsoft, please see the following page on the World Wide Web:

http://www.microsoft.com/support/supportnet/overview/overview.asp

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 this to be a problem in the Microsoft products 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:

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

Additional query words: XL97

Keywords : kbdta KbVBA
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: November 5, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.