Trouble with running the Solver from a macro in Excel 2000

R

rickyl

I am trying use the solver from a macro using code like the following:

SolverOk SetCell:="SumSquaredError", MaxMinVal:=2, ValueOf:="0",
ByChange:="ValveCvMin:ValveOrder"

SolverAdd CellRef:="ValveOrder", Relation:=1, FormulaText:="ValveOrderHi"

SolverOptions Scaling:=True, Convergence:=0.000001, Iterations:=1000
SolverSolve True

This used to work, now it does not. If I manually go into the Solver
window, I find that my constraints have been set properly, but the Target
cell and By Changing cell are both blank. I can set them manually and it
will work, but it will not work from my macro. Any ideas?
 

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