Hi there

I am trying to run the solver by using macro code. So far the solver is
reacting and running properly (with the reference "Tools -> References
-> Solver" activated), except one thing:

After running the macro, I invoke the solver manually to check if the
macro has set the correct solver settings. All is fine, but one
condition is missing: Condition (1) is fine (restricting E9 to positive
values), but condition (2) (restricting E9 to values less than 1) is
missing.

Any idea why? - Help greatly appreciated

Sam
samkut @ web.de

Sub solver_macro()
SolverReset
SolverAdd CellRef:="$E$9", Relation:=3, FormulaText:="0"
(1)
SolverAdd CellRef:="$E$9", Relation:=1, FormulaText:="1"
(2)
SolverOk SetCell:="$F$4", MaxMinVal:=2, ValueOf:="0", ByChange:= _
"$E$9:$E$12,$E$14:$E$17,$F$32"
SolverSolve UserFinish:=True
End Sub