Help

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.

As of July 2025, there are two known issues caused by Microsoft code changes. These are a RefEdit issue that breaks the Model dialog (see #6 below; a user can easily fix this) and a DLL access change that impacts NOMAD (see #10 below; fixing this requires editting VBA code).

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 https://www.or-exchange.org/.

Common Software Problems

Excel can have problems dealing with add-ons. Visit http://www.add-ins.com/how_to_repair_office.htm 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:

Windows

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 http://support.microsoft.com/kb/166273, which talks about this.

Mac

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’ and ‘Compile error: variable not defined’: Missing Reference & Blocked ActiveX RefEdit Errors (updated July 2025)

July 2026 update: OpenSolver uses the ActiveX “RefEdit” control.  If this is not accessible, then you may get a “compile error: variable not defined” error (at a line containing “refObj”) when you open the Model dialog. I have also had a “Run-time  error -2147352573 (800200003)  Could not find the specified object” occur when clicking the “Model” button.

According to StackOverflow, the default setting in Excel has recently changed to a stricter level and this disables controls from external libraries like RefEdit. So, in recent Excel versions, permission to use ActiveX controls must be turned on in the Excel Trust center. To do this, use File…. Options… Trust Center… Trust Center Settings to select “Prompt me before enabling all controls with minimal restrictions” (with “Safe mode” turned on); see this screenshot. (Thanks to jkpieterse for replying on StackOverflow with this information, and for Ziad for sharing the settings that worked for them.)  It also works for me selecting the slightly safer “Prompt me before enabling Unsafe for Initialization (UFI) controsl ith additional restritions and Safe for Initialzatrion (SFI) controls with minimal restrictions”. Note that this change also causes Frontline’s Solver to crash with the error “Solver: An unexpected internal error occurred or available memory was exhausted.”

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.

10. “About OpenSolver” menu crashes; NOMAD crashes (updated July 2025)

July 2025: A recent update to Excel has blocked access to the “OpenSolverNomad.dll” file that we use to execute the NOMAD solver. Symptoms of this include the “About OpenSolver” window crashing with an error: Run-time error: ’53’: File not found: OpenSolverNomad.dll
(This error occurs even though OpenSolverNomad.dll is located in the Opensolver folder under Solvers/win32 and Solvers/win64.) OpenSolver Errors also occur when trying to use the NOMAD solver.

These errors occur because Microsoft have restricted Excel’s access to DLL’s (which is what we use for Nomad). To fix this in OpenSolver you need to edit the code. (We will release a fix at some stage.) For more information, see this Microsoft Community post (also available locally). One of our users, Ed, says “I can confirm that adding the full path in the [NOMAD DLL] declare statement works”. See also this StackOverflow post.

Note: This has been confirmed for “Microsoft® Excel® for Microsoft 365 MSO (Version 2507 Build 16.0.19029.20136) 64-bit” installed as part of “Microsoft 365 Apps for Enterprise” on 12 Aug 2025.

2,231 thoughts on “Help”

  1. OpenSolver is reporting that my model (1034 variables, 2400 constraints) has constraints that are not linear. However, they definitely are linear. I also verified this during a trial use of Premium Solver Pro which solved the exact same model perfectly without linearity issues. Morever, in OpenSolver, the model doesn’t seem to be adhering to all of my constraints regarding positive variables(ex: $O$97:$U$143>=0) and is producing negative values(I also selected, “make uncstrained variables non-negative). Any advice?

    1. Have you tried the latest (v2.1) release? This is more robust in detecting non-linearity, and also uses a newer version of the solver CBCP. If this doesn’t work, then please email me your sheet so I can look at this in more detail. Thanks. Andrew. PS email address is email hidden; JavaScript is required.

      1. Thanks for sending me your sheet. Your model depends on cells that contain random numbers, and so the model changes each time the spreadsheet is re-calculated. OpenSolver is behaving as expected in complaining that the model is non-linear. It works fine if you replace the cells containing formulae involving rand() with the values that were randomly generated. Hope this helps, Andrew.

  2. Hai guys,
    I want to download an excel file from the site, I did it :-).
    But when i click “Enable Editing”, it again downloads the same file from the server.
    Wat may be the problem. Can u please help me

  3. I’ve created a simple linear model which solves easily with the excel ad-in solver, however, when I use open solver to solve the same model I receive an Open Solver Error;

    Subscript out of range
    SourceOpenSolver,ErrNumber=9.

    I am a beginner at this. Have you any suggestions how I can correct this error? Doug

    1. Please email your spreadsheet to email hidden; JavaScript is required so I can track down what sounds like a bug. Thanks for contacting us. Sorry you have hit this issue.Andrew

      1. Hi Andrew, sorry for the delay in responding. I was not auto notified of your reply through my hotmail address though I thought I had selected that option, and was unaware that your response had come in. I’ll get a sheet to you. Thanks. Doug

  4. Although I followed all the steps to convert .xlam to .xla and used it in excel 2003 machines, I am able to install successfully (after minor problems) on a few computers but, getting a problem on a few computers.

    The problem goes like this:
    In excel 2003, I am able to add opensolver from tools–>addins. But, to run the Excel solver from VBA code, I have to add reference to open solver. But, I am not able to add reference from Tools — > References in VBA editor. As soon as I click Tools –>References, I get an error message that says Excel has encountered a problem and needs to close.

    Please help me with this.

    1. This sounds like an Excel bug. I don’t have 2003 any more, sorry, so am no help. Perhaps someone else reading this can give you some ideas? Andrew

  5. Although I followed all the steps to convert .xlam to .xla and used it in excel 2003 machines, I am able to install successfully (after minor problems) on a few computers but, getting a problem on a few computers.

    The problem goes like this:
    In excel 2003, I am able to add opensolver from tools–>addins. But, to run the Excel solver from VBA code, I have to add reference to open solver. But, I am not able to add reference from Tools — > References in VBA editor. As soon as I click Tools –>References, I get an error message that says Excel has encountered a problem and needs to close.

    Please help me with this.

  6. Hey there, thanks for the great program
    but i could not install this to my mac, is there a different software for mac ??

  7. Hi Andrew,

    I’m using OpenSolver ver 1.9 with MS Excel 2010 and find that the search for a LP solution always starts with the variables set to zero. This means that the solver always ends up with a local optimum. In an example that I use to illustrate the benefits of OpenSolver, I can manually improve on the solution by changing values in the variable cells while satisfying all constraints. However, when I get OpenSolver to solve with this new set of cell values it reverts to the originl sub-optimal (local optimum) value in the goal cell. I note that Excel 2010 Solver does not have the initial “Guess” button any longer and wondered if this problem is related to this change in the Excel Solver. It would be preferable to find a local optimum but then entice the solver to search for a better or even global optimum by staring from a different set of initial variable values. Any advice on this?

    Regards
    Daniel

    1. Daniel: OpenSolver only solves linear models, for which there is only one local optimum (being the globally best solution). So, OpenSolver correctly ignores the starting solution. Perhaps your model is non-linear? Andrew

  8. Thanks for this great tip! One last thing: I’ve noted that the number of variables is unlimited, however if the variables are in different selection slots the number of slots seems to be limited to 18 slots. I’ve tried giving a name to the whole range but only the 18 first selection slots are taken into account by OpenSolver. Would you see a way to work around this? Thanks a lot once again for your precious help and best,
    Aziz

    1. Thanks for your feedback. Upgrading CBC should work if you just replace CBC.exe by the new one. I cannot imagine why it failed for you. TYou could try opening the CBC command line from OpenSolver, and see what version it reports. Good luck, Andrew

      1. Thanks Andrew. It turned out to be the problem with my build. I built cbc.exe 2.7.7 from source using VS2010 on Windows 7 and tried to deploy it to Windows XP machine. The program does not work under the machine without VS2010 redistributable libraries. I was able to package all the required libraries into cbc.exe and fixed the problem, and OpenSolver does not complain about no solution file any more. By the way, the cbc.exe in my previous link should work fine on any machine since it seems to be the one containing all the required components.

        1. Thanks for that update. The next OpenSolver version (that I’m still developing) will come with a newer version of CBC (and, hopefully, support for a 64-bit version of CBC). Andrew. PS: We always statically link the libraries when we compile CBC so we only need the one .exe file.

  9. Just to thank you for a splendid piece of software. LP modelling really becomes practical now that one can extend models to reflect complex (large) real-life situations!

    I have one question, though, is it possible to specify values in the variable cells from which OpenSolver can start a search for a solution? It appears to start with zeroes in the variable cells everytime and then keeps on bumping into a local optimum. I guess what I need is something that will allow evolution of the solutions…

    Regards
    Daniel Marais

  10. Hi Andrew,

    Thanks for the great job and for sharing Opensolver.

    Would you please let me know if it possible to see which constrain is not respected when the solver can’t find any feasible solution? Thanks for your help and best,

    1. OpenSolver cannot do this automatically, but I suggest that you add new decision variables that allow the constraints to be violated (and meaure this violation), and then minimise the sum of these violations. Hope this helps, Andrew

  11. I have been working wonderfull with version 1.2,

    I download the version 1.9 (last one) but when I run the model I get a compiling error in VBA Proyect..

    Regards

    Nicolas

    1. I’m sorry to hear you are encountering an error. What is the error message? This code is being used by 1000’s of users, so the problem must be something arising from your particular software setup. It could be a problem with your RefEdit; the OpenSolver site has some info on this at http://opensolver.org/help. Please let me know how you get on. Andrew

  12. If there is another worksheet (with macros) open on the same instance of Excel, OpenSolver gives errors. It works fine if there are no other worksheets open. Any clues?

    1. I have tried, but I cannot reproduce this, sorry. Could you please tell me what you were doing when the error happened, what error message you got, and a little more about the second worksheet you have open? Thanks, Andrew

  13. Dear Admin

    the first: I want to thank you, for your opportunities to have everyone the DEA Frontier Model, its help me very much to made my data research in my dissertation process.
    the second: I have question: how many time I can use the DEA Frontier software (free option)because I need to have next view weeks or once mouth

    Best Regard:
    Jeton

    1. Jeton: You need to direct DEA Frontier questions directly to them; we look after OpenSolver only (which DEA Frontier have chosen to make their software compatible with). Andrew

  14. A specific question about Quick Solve: What’s the format for defining the “changing parameters”? Do they all need to be on the same sheet and contiguous?

    1. The parameter cells are any range you can select using the standard Excel RefEdit control used by OpenSolver, which from memory restricts the cells to be on one sheet. They do not have to be contiguous. Cheers, Andrew

Leave a Reply to aziz Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.