Solver Macro in Excel 2007

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

Guest

I recorded a Macro in Excel 2007 that uses the Solver, so I have macros
enabled and security set to low, and I have installed the Solver Add-In, but
when I run the recorded Macro, an Error Message comes up:

Compile Error:
Sub or Function not defined.

Here is the code, but I can't see how it could have a problem if Excel
recorded it.

Sub FindEquation()
'
' FindEquation Macro
'

'
SolverOk SetCell:="$K$4", MaxMinVal:=2, ValueOf:="0", ByChange:= _
"$G$4,$H$4,$I$4"
SolverSolve
SolverOk SetCell:="$L$4", MaxMinVal:=2, ValueOf:="0", ByChange:= _
"$G$4,$H$4,$I$4"
SolverSolve
SolverOk SetCell:="$K$4", MaxMinVal:=2, ValueOf:="0", ByChange:= _
"$G$4,$H$4,$I$4"
SolverSolve
End Sub

Any suggestions?
Thanks
 
Back
Top