Say, I will run solver for 10 cases, while running the 10 cases, I do not want to be paused by the result dialog.
I found some relevant codes but not sure how to make sure of it yet.
If SolverSolve(Userfinish:=True) > 2 Then
MsgBox "Solution can't be found"
End If
Instead of popping out message box when solution cannot be found, I want the solver to continue until the end and display the result codes of all the cases in certain cells, like below:
Case01: 0
Case02: 0
Case03: 4
...
...
...
So that I can go back to the cases which give me result code from 3 onwards; ie those without solution.
Result Codes
0 Solver found a solution. All constraints and optimality conditions
are satisfied.
1 Solver has converged to the current solution. All constraints are
satisfied.
2 Solver cannot improve the current solution. All constraints are
satisfied.
3 Stop chosen when the maximum iteration limit was reached.
4 The Set Cell values do not converge.
...
...
12 Another Excel instance is using SOLVER.DLL. Try again later.
13 Error in model. Please verify that all cells and constraints are
valid.
Thanks.
Bookmarks