XL97: Compile Error Running Recorded Macro That Uses Solver (183851)
The information in this article applies to:
- Microsoft Excel 98 Macintosh Edition
This article was previously published under Q183851 SYMPTOMS
When you run a Visual Basic for Applications macro that you created by
using the macro recorder, you may receive the following error message:
Compile error:
Sub or Function not defined
CAUSE
The problem occurs when you run a recorded a macro that uses the Solver
add-in and you do not reference the Solver add-in.
RESOLUTION
To resolve this problem, create a reference to the Solver add-in. To create
a reference to the Solver add-in, follow these steps:
- Start the Visual Basic Editor (press OPTION+F11).
- On the Tools menu, click References.
- Select Solver, and then click OK.
NOTE: The Solver.xla file is located in the Microsoft Office
98:Office:Excel Add-ins folder
The next time you run the macro, this problem does not occur.
STATUS
This behavior is by design of Microsoft Excel.
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:
179216 OFF98: How to Use the Microsoft Office Installer Program
Modification Type: | Major | Last Reviewed: | 9/11/2002 |
---|
Keywords: | kbprb kbProgramming KB183851 |
---|
|