Hi,
FIrst, here is the macro for creating the model
SolverOk SetCell:="$A$3", MaxMinVal:=1, ValueOf:="0", ByChange:="$A$1:$A$2"
SolverAdd CellRef:="$A$3", Relation:=1, FormulaText:="100,5"
SolverAdd CellRef:="$A$1", Relation:=1, FormulaText:="10,5"
SolverAdd CellRef:="$A$2", Relation:=1, FormulaText:="5,5"""
SolverOk SetCell:="$A$3", MaxMinVal:=1, ValueOf:="0", ByChange:="$A$1:$A$2"
SolverSolve
End Sub
THen I samve the model, start a macro and then load the model
THeis is the code output. As you can see the contratints are not there. Strange or?
SolverOk SetCell:="$A$3", MaxMinVal:=1, ValueOf:="0", ByChange:="$A$1:$A$2"
SolverLoad LoadArea:="$B$7:$B$12"
SolverOptions MaxTime:=100, Iterations:=100, Precision:=0.000001, AssumeLinear _
:=False, StepThru:=False, Estimates:=1, Derivatives:=1, SearchOption:=1, _
IntTolerance:=5, Scaling:=False, Convergence:=0.0001, AssumeNonNeg:=False
SolverOk SetCell:="$A$3", MaxMinVal:=1, ValueOf:="0", ByChange:="$A$1:$A$2"
SolverSolve
Does the first piece of code work for you when put into a control button?
a3=a1*a2
thANLS FOR ALL THE HELP SO FAR. thIS PROBLEM IS SO STRANGE...
Bookmarks