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,220 thoughts on “Help”

  1. Hi Andrew,

    I have created model using Opensolver. I want to execute this model using Macro on a button click.

    Can you please help me out how to do the same.

    Regards,
    Rahul

    1. Calling OpenSolver from VBA is documented on the OpenSolver.org site under Using OpenSolver. Hope this helps. Andrew

  2. Asked by my IT guy…
    There appear to be firewall dependencies. Have the vendor provide a list of ports/IPs that are needed to be opened to allow their application to run.

    Does anybody know this?

    1. OpenSolver does not make any IP connections (apart from opening OpenSolver web pages). You will need an internet connection to download it, of course. Andrew

  3. Every time I open Excel 2007 – openSolver initialises the last model.

    How do I disable that behaviour?

    Thanks

    1. What do you mean by “initialise”? OpenSolver does not run on startup, and so should not change the model. Andrew

  4. Hi everyone!
    I’m trying to solve quite a big problem, about 1000 variables with 300 constraints. Even though I find an optimal solution (and I believe it is right), I would like to see whether there are any other solutions that give the same optimal value.
    Most important, I would like to get the output of cbc.exe in a text file so as to see what opensolver did while solving my model. Is this possible?

    1. Juan. Finding other solutions is hard; you’d need to check the CBC documentation to see what additional outputs you can get (or you can add cuts to remove the optimal solution, and solve again). The OpenSolver menu provides you with options to look at the input and output files. Cheers, Andrew

  5. Hei
    I have build the model I wish to solve in several spreadsheets in my workbook. I am experiencing some problems with entering the model in open solver, and was wondering if I have to incorporate the entire model in one spreadsheet?

    1. No, OpenSolver modesl can span multiple sheets in the sense that you can have constraints and and objective on different sheets. Andrew

  6. Hello,

    I am trying to run a similar model (same matrix each time, but with different constraint ‘b’ values and obj function coefficients) 20 times. I have around 522 x’s and 1000 constraints. Is there any way to speed up the time spent building the model/’setting up problem’, since the matrix is identical each time? Right now, it would take around 30 mins to run and I would like to improve the time if possible.

    Thank you for producing this powerful and easy to use solver,

    SVK

    1. Quick Solve does exactly what you want, where the ‘parameters’ are the right hand sides. For me it turned an hour’s running into 1 minute! Let me know how you get on. Andrew

  7. I am having problems with my solver solution. It works with excel solver, but as I need to run more than 200 variables, I am using open solver. It keeps giving me a negative number for one particular line item. Some of the decision variables are constrained as binary and integers values. The others I want between 0 and 1 and I have set up my constraints that way. I keep getting this one negative number and the message that it is unfeasible. When I take out some line items and run it in solver, it works.

    1. Please use OpenSolver’s “View Last Model .lp File” to check the .lp file to see if the model is as you expect. If it is, then feel free to email me the spreadsheet; send it to a dot mason at auckland dot ac dot nz. Cheers,Andrew

    2. I am having this same issue. I have a series of binary variables, and I am getting a message saying that the constraints binding the binary variables are not linear, and there is no feasible solution. Not sure how to go about fixing this.

  8. Hi Andrew, I am back after some time. OpenSolver works fine, but what is SolverStudio? Is it supported by you? Is it a free download? What advantages does it have over OpenSolver? In particular, can it help to reduce the model set up time?

    1. Welcome back! SolverStudio is supported by us, and is a free download. It reduces the model build time significantly, but at the expense of you having to develop the model using a formal modelling language such as AMPL, GMPL or PuLP. We’d recommend using a modelling language anyway for big models; SolverStudio let’s you do this but still stya with Excel. SolverStudio also lets you solve models in the cloud with free access to linear and non-linear solvers. We’d welcome your feedback if you give it a try. Cheers, Andrew

  9. Any plans to incorporate BONMIN (nonlinear mixed integer) to OpenSolver? The 200 limitation on Excel is appalling.

    1. We have an unreleased beta running NOMAD. Bonmin will be more work, but is something we are thinking about. Andrew

  10. Hello,

    I am trying to use the solver but get an error: “The objective cell does not appear to contain a numeric value” ErrNumber=-2147220504, but the objective cell=target cell?? is a number… Hope you can help? can I send you the spreadsheet (how)??

    Brgds Daniel

    1. Daniel: This often happens when the objective/target cell has a non-linear formula that gives #DIV/0! or similar for some values of the decision cells. Such a model is non-linear, and so not suitable for OpenSolver because OpenSolver uses the CBC linear optimiser. If this is not the cause of your problem, feel free to email me the sheet at email hidden; JavaScript is required. Cheers, Andrew

  11. Je vous remercie pour cette aplication, elle est tellement utile pour mon probleme, un grand merci pour vous, bonne continuation.

  12. As a follow up, I also went ahead and downloaded the latest version of the cbc file and inserted it into the folder that is referenced in the Excel Add-In manager. The exact same error report is returned when I try to run the model again.

    OpenSolver encountered an error:
    Subscript out of range (at line 9440) (at line 19530)

    Source = OpenSolver, ErrNumber=9

    1. Hi all,

      I still haven’t figured out how to get OpenSolver to run without reporting the error below. I have to use the tool for a major project due on April 25th. I know you probably get many requests for support, but could you help me with this issue so that I can use this truly excellent tool? Thank you!

      OpenSolver encountered an error:
      Subscript out of range (at line 9440) (at line 19530)

      Source = OpenSolver, ErrNumber=9

      1. Hi Bo,

        Just wanted to check if you were able to find a solution to the above mentioned problem? I am getting the exact same error.

        Any help will be appreciated.

  13. To elaborate on my previous post, the error looks like this:
    “OpenSolver encountered an error
    The CBC solver did not create a solution file. No new solution is available. (at line 12300)(at line 19540)

    Source = OpenSolver Model Solving. Error Number = -2147220503

    1. The problem is almost certainly that CBC is crashing. You may wish to try the latest version of CBC; see the “CBC Downloads” link on http://opensolver.org. Just replace the cbc.exe file in the OpenSolver folder with a newer version you download. Hope this helps, Andrew

  14. I am running open solver and am getting the “CBC solver did not create a solution file” error.
    I was able to run it in the same file with a smaller size problem and I had no issues. this problem though has 60,000 variables. It successfully sets up the problem and writes problem to disk but when it starts to solve it lags Excel for a minute or 2 and then throws back the error.

    I’ve tried moving the OpenSolver file from my desktop to my documents and that made no difference either. This is also my own personal laptop and OpenSolver has no issues with other models.

    Any ideas?

Leave a Reply to SS 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.