R
robs3131
Hi,
I am having issues with Solver -- my code is below. It only works with the
code after running it manually -- and only when the same exact scenario being
run by the code is executed manually first (if I run Solver manually for a
scenario which is completely different than the scenario in the code, the
code still does not work). There is no error coming up, it just completes
with no output.
I tried putting in the statement directly below into my code (saw this
suggestion in another post), but this does not correct the issue.
Application.Run "Solver.xla!Solver.Solver2.Auto_open"
Any idea on how I can resolve this? Thanks ahead of time!
' In the scenario I've been testing, "holdclearsumprod" ='Transaction
Summary'! _
$AK$1, cell AK1 = sumproduct(L2:L5,AJ2:AJ5), "holdclearbin" ='Transaction _
Summary'!$AJ$2:$AJ$5
Sheets("Transaction Summary").Activate
SolverOk SetCell:="holdclearsumprod", MaxMinVal:=3, ValueOf:="=AL1", _
ByChange:="holdclearbin"
SolverAdd CellRef:="holdclearbin", Relation:=5, FormulaText:="binary"
SolverSolve userfinish:=True
I am having issues with Solver -- my code is below. It only works with the
code after running it manually -- and only when the same exact scenario being
run by the code is executed manually first (if I run Solver manually for a
scenario which is completely different than the scenario in the code, the
code still does not work). There is no error coming up, it just completes
with no output.
I tried putting in the statement directly below into my code (saw this
suggestion in another post), but this does not correct the issue.
Application.Run "Solver.xla!Solver.Solver2.Auto_open"
Any idea on how I can resolve this? Thanks ahead of time!
' In the scenario I've been testing, "holdclearsumprod" ='Transaction
Summary'! _
$AK$1, cell AK1 = sumproduct(L2:L5,AJ2:AJ5), "holdclearbin" ='Transaction _
Summary'!$AJ$2:$AJ$5
Sheets("Transaction Summary").Activate
SolverOk SetCell:="holdclearsumprod", MaxMinVal:=3, ValueOf:="=AL1", _
ByChange:="holdclearbin"
SolverAdd CellRef:="holdclearbin", Relation:=5, FormulaText:="binary"
SolverSolve userfinish:=True