Solver Macro in Excel 2007

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top