Welcome to the OpenSolver on-line help.

We hope that most of your questions will be answered on the Using OpenSolver page. However, if you still have a question, please post it below.

Building  Linear Programming models

Writing optimisation models that only use linear mathematical equations and inequalities is not easy. However, most of the time you want to build these “linear programming” models (and avoid non-linear models) because these are easier and more reliable to solve using packages such as OpenSolver. (OpenSolver uses CBC by default to solve these linear programmes.) Check out this Wiki page on linear programming.

The AIMMS folks have a great online chapter describing how to take non-linear requirements (local copy of pdf) and model them using linear programming. (Thanks to Stu Mitchell of PuLP fame for pointing out this resource.) The NEOS guide is also a great resource. If you still have a modelling question (e.g., how do I express this requirement using the rules for a linear program), please ask it on

Common Software Problems

Excel can have problems dealing with add-ons. Visit for a guide on fixing these.

1. OpenSolver not loading – July 2016 Office update (no error message)

In July 2016, MicroSoft released an update to Office 365 which prevents OpenSolver from loading unless the .zip file is “unblocked” before the files are extracted. (We expect this change to appear in other versions of Excel.) The symptoms are simply that OpenSolver does not appear in the Data tab; there is no error message shown. To fix this, delete your old OpenSolver files (but not the downloaded .zip file), right click the downloaded OpenSolver .zip file, choose Properties, and click the Unblock button which will show if the file is blocked. Once the file is unblock, close the properties dialog, and then un-zip the files and open up OpenSolver.xlam as usual.

2. Unable to find the external solver …

If OpenSolver reports this problem, then it could not find a solver file that comes with OpenSolver. Please check that you have extracted (i.e. un-zipped or uncompressed) all the files from the OpenSolver download.

3. The solver did not create a solution file.

If this error is reported, then it is likely that OpenSolver was unable to run the solver executable. This may happen if the OpenSolver files  are in an ‘untrusted’ location, and so Windows will not let them be run. First check whether the solver is shown as found in the “About OpenSolver” form. If not, go to the folder identified in the “About OpenSolver” form and double click on this solver file. You should then see a command window open that gives the solver name and version information etc. If you don’t see this, then Windows should give you an error message to help you diagnose the problem. It may help to move the OpenSolver folder (and all the files it contains) into a location such as your Documents, or even into Program Files, and try again.

4. Solver crashes; OpenSolver reports no solution file

The files in the “Solver” folder provided with OpenSolver contain the actual solver code. These solvers are being continually upgraded as bugs are reported and fixed. If OpenSolver reports that no solution file was generated, then the solver may have crashed. This can happen on big problems when the solver runs out of memory, but also on smaller problems that happen to hit a solver bug. In such cases, you should check if a newer version of OpenSolver is available since we regularly update the solvers included with OpenSolver as they are released.

With CBC, a typical OpenSolver error for thois problem message might be: ‘The CBC solver did not complete, but aborted with the error code -1073741510’

If needed, you can download the latest version of CBC, Bonmin or Couenne from AMPL. Download the either the Windows or Mac version as appropriate. For Windows, get the 32-bit version if you have 32-bit Windows, or the 64-bit version otherwise. (The 64 bit version will solve much larger problems than the standard 32 bit version included in OpenSolver, so always choose this if possible. Right-clicking on Computer, and choosing Properties, will tell you if have a 32 or 64 bit system type.) Right click on the downloaded .zip file, choose Properties, and click the Unblock button if there is one. Then, open the .zip file, and drag the files into the right location in your OpenSolver Solvers folder (the win32, win64 or osx folder as appropriate), replacing the existing files. This may fix your problem.

Report a CBC bug

If after installing the latest version of CBC, CBC still crashes on you, then you may wish to report a bug. Please be sure to include the .lp file produced by OpenSolver; you can open this file using “View Last Model .lp File”. CBC bugs can be reported by either:

  1. The online CBC TRAC bug reporting system (which you will have to register for), or
  2. The CBC mail list

Switch from CBC to Gurobi
Since August 2014, OpenSolver has also supported solving models using the Gurobi solver. You can obtain a copy of this solver at no charge if you are at a university. Gurobi is faster and more stable than CBC, and comes highly recommended.

5. Repairing Excel

Sometimes it is useful (if all else fails) to repair your Office installation:


See these Microsoft Office 2010 and later instructions (or in Excel 2007, use Excel’s application menu, then Excel Options, then Resources, then “run Microsoft Office Diagnostics”). You might also want to look at, which talks about this.


Unfortunately there is no easy way to repair the Office 2011 installation. The best option is to follow these instructions to completely uninstall Office. You can then install Office again from scratch to get a clean version installed.

6. ‘Can’t find project or library’ : Missing Reference Errors

OpenSolver uses the “RefEdit” control, which we need but which can cause problems because of missing references caused by version changes. To check for missing references, using the VBA editor (which you access using Alt-F11), select OpenSolver (openSolver.xlam) in the Project window, choose Tools… References, and look for a “Missing:” line. If you see this, un-check that line, close the dialog, and choose File … Save OpenSolver.xlam to update the file. If this doesn’t help, try the above steps for repairing Excel.

7. Error 70: Unable to delete the file: C:\Users\XXXXXX\AppData\Local\Temp\log1.tmp

This errors happens if Excel crashes while OpenSolver is running, leaving log1.tmp open. Please restart your computer, which will close this file, and try again.

8. OpenSolver was working on my Mac. Then I updated to Excel 16.16.7 (released late 2018) and OpenSolver stopped working. What do I do?

We have had numerous users report this issue. We are looking for a Mac user with VBA experience to help us diagnose this problem. Please contact us at email hidden; JavaScript is required if you can help.

9. OpenSolver does not work in Excel installed from the Windows Store

Windows Store versions of Office applications do not support Add-ins such as OpenSolver; see this link, or this support page for another add-in, or this technical article from Add-in Express. This Dell article explains a little more. If you have a Windows Store version, it will display this in the Excel Version information, such as in the following example:

Version 1807 (Build 10325.20082 Microsoft Store)

The solution is to un-install Excel, and install the click-to-run versions, in which case the Excel version will change from ‘Microsoft Store’ to ‘Click-to-Run’. Standard installs (meaning not Office 365) don’t have this issue.

1,863 thoughts on “Help”

  1. Nathan, Pleased to hear that the Quick Solve feature is being used. I’d suggest that you put your custom code in your own spreadsheet instead of making changes to OpenSolver. That way OpenSolver upgrades won’t force you to re-implement your code changes. Can I ask what sort of problem you are solving? Your’s sounds like the most advanced OpenSolver usage I have come across. Andrew

  2. I apologize for not being more specific in saying that the tweaks I have made are all very application specific and do things like allows the quicksolve parameters to be automatically set based on the problem size instead of using a dialog box. -Nathan

  3. Tweaks I have made to the VBA source code (opensolver.xlam) seem to be automatically removed sometimes when I come back to the excel file after a few days. What could be causing this and how can I prevent it?

    An adhoc workaround has been to save my custom function in the VBA for my worksheet (commented out) and then paste it back into opensolver.xlam and uncomment it when the thing starts acting up. I would like a long term solution.


    1. Nathan: Excel does not remind you to save changes to an addin like OpenSolver when you quit Excel. Therefore, you have to always remember to save the changes yourself. This is all I can think of that would be causing you problems – OpenSolver doesn’t do anything unusual in this regard.

      What are the tweaks you are making – should we be adding these as new features? Andrew

      1. Hi Sir,

        13 Sep 15 18:17:05 [OpenSolver.xlam] COpenSolver.ApplyBounds: Line 1231
        13 Sep 15 18:17:05 [OpenSolver.xlam] COpenSolver.BuildModelFromSolverData: Line 1147
        13 Sep 15 18:17:05 [OpenSolver.xlam] OpenSolverAPI.RunOpenSolver: Line 0

        I am facing the above mentioned error when i try to run opensolver 2.7.1. Request you to suggest what could be the possible reasons for the same.

        1. Sorry it is not working. I can confirm this causes the error in our latest pre-release code, and that we have added it to our bug tracker, and hope to fix it for the next release. In the meantime, I suspect you have a non-numeric value in a cell for a bound; please check for this. Andrew

  4. I created a new Add-In for use with Excel 2000-2003 including a menu duplicating that shown for the Excel 2007 and up ribbon. I would like to send the new XLA file to you so it can be made available to your users. Please contact me via email and I’ll send it to you.

    Thank you for the excellent work!


        1. Thomas: Paul’s work (below) is not yet finished, and so OpenSolver does not (yet) exist in an Excel 2000 or 2003 compatible version. Note that you can call OpenSolver from VBA even in Excel 2000 and 2003; it is just the menu interface that needs to be built. Hope this helps. Andrew

            1. We are working on the next version. What changes are thinking of making? Let’s chat about this over email. Andrew

      1. Giovanni, The current OpenSolver code should work fine as it is under Excel 2003, but it does not have any user interface. If you like to write VBA code to create and add a new Excel 2003 menu for OpenSolver, we would love to include it in the distribution. Andrew. PS: I will also email Paul again to see if he’s ready to release his code.

  5. Hi Andrew,

    I’ve yet another question for you. Is it possible to set a constraint ‘is not equal to’. In a cell I’ve a sumproduct formula. The value of this cell has to be larger than 3, smaller than 8 and is not allowed to be 5. The first two constraints I’ve set in the solver with the ‘=’ signs. but there is not a ‘is not equal to’-sign. I’m wondering if I could somehow set a constraint that the cell value cannot be 5?

    1. You cannot say “x is not equal to 5” in a linear program. A bit of fancy formulation would let you do this in an integer program. To see how, I suggest you refer to a section on binary and integer variables in an OR modelling textbook. Good luck. Andrew. PS: I don’t think your next comment changes my understanding of your problem.

  6. Can you please provide steps how to use the open Solver in Excel 2003. I see a note about being able to call it directly from VBA. Can you please provide the steps how to do that.


    1. We have never run OpenSolver under Excel 2003. However, calling ‘RunOpenSolver false’ from VBA will solve your current problem. Hope this helps. Andrew

  7. more on 1004 error. I am experiencing the same 1004 error ad Jonathan Ho (see October post). I am using office 2010 with windows 7. Any help would be greatly appreciated

    1. Renato: OpenSolver is being updated for Excel 2010; the current version supports Excel 2007, but not 2010. Keep an eye on the site for a new release soon. Cheers, Andrew

  8. Hi Andrew,

    I already solved it. I don’t know what was wrong with the worksheet, but after i made the sheet all over again it worked out perfect. This openSolver is a great peace of software, thanks a lot!

  9. Hi Andrew,

    First i want to thank you for this open Source version of the solver function. I tried to use it at my university, but unfortunately I OpenSolver gives a error: ‘OpenSoulver encountered error 91, Object variable or With Block variable not set’. I’m trying to appoint students to specific subjects (4 in total), according their preferred subject. Of every student I have 1st, 2nd, 3th and 4th choice of the four subjects, and I try to minimize the sumproduct-cell with the solver. But it doesn’t work out. Do you know something I can try to make it work? I can send you the file if you like to.
    Thanks a lot.
    Rutger Tjallema

    1. Rutger, sending me the file is probably the easiest way for us to see what’s going on. My email address is below. Cheers, Andrew

  10. Andrew,

    Thank you for your quick reply. I will send you the model immediately. If you don’t use Premium Solver, how do you indicate -with Open Solver- to your model where are the decision variables, constraints and objective?

    1. Juan. Please post your sheet to a.mason at auckland dot ac dot nz, and we will have a look at it. (Ordinary) Solver can edit and store the model details (ie decision vars etc); you don’t need Premium Solver to do this. Just build your model in the usual way using Solver, but then solve it using OpenSolver. Note that Solver’s OK button tends to throw away changes made to the model; I suggest you click Solve first, click through the “too many adjustable cells” dialog, and then click OK. Andrew

Leave a Reply

Your email address will not be published. Required fields are marked *