VBA Solver code issue
<p>I am currently using a loop is which I access the excel solver. But every time the solver solves an optimization problem, I have to click ok. I tried record macro, but no code came up when I click the OK button. I will always accept the solution suggested by the solver.I do not want to keep pressing Ok button all the time. There could potentially be 2000+ optimization problems being solved. Is there a way of making this work?</p>

<p>Also, is there a way of solving unbalanced transportation problem is a solver without having to make dummy supplies or demand nodes?</p>

<p>Thank you.</p>

<p>The codes is as follows:
SolverReset</p>

<pre><code>SolverOk SetCell:="$B$18", MaxMinVal:=2, ValueOf:=0, _
ByChange:="$M$5:$T$12", Engine:=2, EngineDesc:="Simplex LP"

SolverAdd CellRef:="$U$5:$U$12", Relation:=1, FormulaText:="$V$5:$V$12"

SolverAdd CellRef:="$M$13:$T$13", Relation:=2, FormulaText:="$M$14:$T$14"
SolverSolve
</code></pre>