Disable Solver Result Dialog Box & Display Result in Cell

yauchildchew

New Member
Joined
Jun 19, 2010
Messages
7
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.

Code:
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.

Code:
[B]Result Codes[/B]
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.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,214,925
Messages
6,122,298
Members
449,077
Latest member
Rkmenon

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top