If I try to run this macro, I will get a compile error. The command SolverResetis will get highlighted, and the error message appears.
Microsoft Visual Basic
Compile error:
Sub or Function not defined
OK Help
An error occurred in Macro`s error in VB
A Sub or Function must be defined in order to be called. Causes of error:
1) Misspelling the name.
2) Call a procedure from another project without adding a reference(in the References dialog box).
3) Specifying a procedure, not visible to the calling procedure.
4) Declaring a Windows dynamic-link library (DLL) routine, that is not in the specified library or code resource.
To correct this error, you may try this:
1) Make sure that the procedure spelling is correct.
2) Check the procedure name in the References dialog box. If it does not appear, click the Browse button to search for it.
An error occurred in Macro`s error in VB
Hi,
The attached picture states that SolverOK but SolverReset highlighted when you tried to run Macro. To resolve this issue try to set reference to SOLVER. How to do it? Here’s how…
1. Open your workbook. Find TOOLS Menu click Macro then choose Visual Basic Editor (VBE)
2. With Visual Basic Editor, choose Menu Tools.
3. Find and click References. Check on the Solver References
4. Select Solver.xls and then click OK
If there is no Solver.xls in Available References list, look for it.
1. Click Browse.
2. Find dialogue box Add Reference
3. Find and select Solver.xla file. Open.
4. Typical path of Solver.xla (C:Program FilesMicrosoft OfficeOfficeLibrarySolver subfolder)
Don’t forget to tick the Solver Box in the VBA References List to ensure display in the VBA Project Explorer window. Also take note that you tick the STOP button before going into tools and references.