Hello.
I have a workbook that contains several sheets. I'm trying to make two solvers run on separate sheets, solver 2 is dependant on solver 1.
Solver 1 works as it should but I can't get solver 2 to run by itself, I have inserted a button for solver 2 to work but I would like to run it automatically.
The solvers are placed in each module where I call the first macro in sheet1 with Worksheet_Change.
The "goal cell" from solver 1 is affecting the "changing cell" in solver 2.
Can anyone help me with this ?
Solver1:
Solver2:
I have a workbook that contains several sheets. I'm trying to make two solvers run on separate sheets, solver 2 is dependant on solver 1.
Solver 1 works as it should but I can't get solver 2 to run by itself, I have inserted a button for solver 2 to work but I would like to run it automatically.
The solvers are placed in each module where I call the first macro in sheet1 with Worksheet_Change.
The "goal cell" from solver 1 is affecting the "changing cell" in solver 2.
Can anyone help me with this ?
Solver1:
Code:
Sub Centrifuge_load()
'Centrifuge_load Macro
SolverReset
SolverAdd CellRef:="$D$36", Relation:=2, FormulaText:="$E$36"
SolverAdd CellRef:="$N$19", Relation:=2, FormulaText:="$E$28"
SolverOk MaxMinVal:=0, ValueOf:=0, ByChange:="$E$34,$D$29", Engine:=1, _
EngineDesc:="GRG Nonlinear"
SolverOk MaxMinVal:=0, ValueOf:=0, ByChange:="$E$34,$D$29", Engine:=1, _
EngineDesc:="GRG Nonlinear"
SolverSolve True
End Sub
Solver2:
Code:
sub Evap_C02002()
SolverOk SetCell:="$J$8", MaxMinVal:=3, ValueOf:=0, ByChange:="$F$13", Engine:= _
1, EngineDesc:="GRG Nonlinear"
SolverOk SetCell:="$J$8", MaxMinVal:=3, ValueOf:=0, ByChange:="$F$13", Engine:= _
1, EngineDesc:="GRG Nonlinear"
SolverSolve True
End Sub