How do I Use Solver with the Macro Recoder/VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Sub Macro4()
'
' Macro4 Macro
' Macro recorded 7/14/2007 by John Reed
'

SolverReset
SolverOk SetCell:="$BR$58", MaxMinVal:=1, ValueOf:="0", ByChange:= _
"$BL$11:$BL$58"
SolverSolve
End Sub

When I try to run the macro I receive the following error, "Sub or Function
Not defined".

Following the directions in help, I go to the tools, reference and the lib
and all that is in the lirruary is a dll and it does not allow me to open.

What I want to do is have a VBA routine that calls Solver, Set the cell, and
the bychang:= My Range Variable

Thanks for the help in advance
 
From Help.........

To set a reference to an application's type library
Click References on the Tools menu.
Select the check boxes for the applications with type libraries you want to
reference.


So...........In Tools>References scroll down to "SOLVER" and checkmark it.


Gord Dibben MS Excel MVP
 
Back
Top