I'm trying to automatically solve multiple lines of solver conditions on a single worksheet (excel 2007). However, every time solver finishes the calculation for one line, it raises a dialog box asking me whether I want to retain the solver solution. How do I automate the "press OK" event in the VBA code? Here's part of the resulting code:
.....
SolverReset
SolverOk SetCell:="$O$5", MaxMinVal:=2, ValueOf:="0", ByChange:="$L$5"
SolverAdd CellRef:="$O$5", Relation:=3, FormulaText:="$DU$5"
SolverOk SetCell:="$O$5", MaxMinVal:=2, ValueOf:="0", ByChange:="$L$5"
SolverAdd CellRef:="$L$5", Relation:=3, FormulaText:="$DW$5"
SolverOk SetCell:="$O$5", MaxMinVal:=2, ValueOf:="0", ByChange:="$L$5"
SolverSolve
SolverReset
SolverOk SetCell:="$O$6", MaxMinVal:=2, ValueOf:="0", ByChange:="$L$6"
.....
Thanks!
Bookmarks