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. Hi Andrew,
    Can you tell me your email address? I want to send my model to you and ask for your help to check it. The model runs and gives an “optimal” solution but actually there are some constraints it doen’t satisfy. The problem is serious to me, so your help is highly appreciated. I will clarify the model to make it easily understandable. Thanks.

  2. I am trying to solve integer programming models. The size of models are normally 5000+ binary variables and 10000+ constraints. I met a few questions when running it.

    First, I want to use your tool to find a feasible solution that satisfies all constraints but no objective needed. So I set the objective as minimizing a constant. When I run it, sometimes it can give me a feasible solution, but sometimes it says infeasible while I’m sure it has a feasible solution. So I want to know how opensolver works and what result Opensolver normally gives under this condition.

    Second, I want to make sure whether Opensolver has limitations for variables and constraints in integer programming. Because for medium size model(about 1000 variables) Opensolver can give optimal solution in most cases, but for my models(5000+ variables) Opensolver always says no optimal solution can be found, but actually the problem is not infeasible. Even changing solving time and B&B tolerance doesn’t help.

    1. Sue: Thanks for your questions. Firstly, OpenSolver has no size limits, and should be able to handle a constant objective. So, there are two remaining issues here. (1a) Is OpenSolver building the correct model for CBC to solve and (1b) correctly interpreting CBC’s output? (2) Is CBC able to solve the model? To address these, please use the “View last model .lp file” menu item to check that the model OpenSolver creates is as you expect, and also use “View last CBC solution file” to check that OpenSolver is correctly interpreting the output CBC produces. In terms of (2) — CBC’s ability to solve the model — if you can send me a spreadsheet that contains a feasible solution (that you have created) that OpenSolver cannot find, then I (and the CBC folks) would be most interested. Do be aware that integer models can be very hard to solve, and that you should not expect perfect integer values in the answers. To help your debuggin, you may wish to view the CBC output during the run; please see the Using OpenSolver page for info on this. Please let me knopw how you get on. Cheers, Andrew

    1. OpenSolver can only generate one “report”, being a list of constraints and their dual prices. It cannot generate Solver’s reports. I have only ever used these reports in teaching, never in a real application. Are you wanting them for teaching? Andrew

  3. hi, when i am trying to build model by clicking any button, says “Can’t find project or library”. What should i do?

    1. Sorry to hear you are having problems. I’d try repairing Excel (using Excel application menu, then Excel Options, then Resources, then “run Microsoft Office Diagnostics” in Excel 2007), which often helps but is a bit of a stab in the dark. You might also want to look at http://support.microsoft.com/kb/166273, which talks about this. Please let me know if you find any missing references as per the last link. Cheers, Andrew

      1. in tools > references saying “Missing: Ref Edit Control”. if I uncheck that line, solver working correctly, at least i did not see an error. But whenever i want to use solver i have to repeat those steps.

        1. Using the VBA editor (which you access using Alt-F11), you should be able to save OpenSolver after un-checking the “Missing: RefEdit Control” line. This should fix your problem, which seems to be caused by some version differences with RefEdit. We need RefEdit, but it is known for being a difficult control because of these sorts of issues. I hope this helps, Andrew

    1. I’m sorry it is not working for you. I suggest you remove any current version, and then try downloading it again. If that does not work, reparing Excel has worked for people. It is more likely to be a problem with your setup than with OpenSolver. Hope this helps, Andrew

  4. Hi Andrew,

    I am trying to solve a problem with about 13000 integers variables and 20000 rows, my code in VBA and the OpenSolver took five days to setup the problem because my laptop is very slow, then, the Excel has stopped running, however, there is a Cbc.exe that is using memory in the task manager.
    Could you tell me if Cbc.exe is trying to solve the problem? Or can I stop the Excel because that problem will not solve?

    Best Regards,

    Eden Denis

    1. Eden: Sounds like you have a big problem. Yes, if you can see CBC.exe running in the Task Manager, then your problem is being solved. I’d suggest next time you turn on CBC output using the Model… Options… Show optimisation progress while solving. Good luck, Andrew. PS: Now that you have your model built, you can use the OpenSolver…. Open Last Model in CBC to get your model loaded into CBC and try different strategies for solving it. You might also like to see the Advanced CBC Options on the Using OpenSolver page to turn on more logging.

  5. Hi Andrew,

    I am trying to solve a problem with about 13000 integers variables and 20000 rows, the OpenSolver took about five days to setup the problem, so, the Excel stopped working, however, there is a Cbc.exe process who is working and using the memory in the task manager.
    Could you tell if Cbc.exe is working to solve the problem or I can end the Excel because it is not working anymore?

    Best regards,

    Eden Denis

  6. Sir,
    I am using Excel Solver for reservoir sizing. In order to penalize the spill in objective function, I require the value of arbitrary constant M
    Please guide me.
    Thanking you
    Yours faithfully
    GL. Chunale

    1. Gajanan: I suggest you look at a book on LP/IP modelling; this forum is for OpenSolver questions, not modelling ones. Good luck, Andrew

  7. Great Product, much better than anything else on the market

    We are using version 1.9 run via the C# equivalent of RunOpenSolver true false. This works wonderfully for runtime exceptions. The problem is that this doesn’t seem to stop the “OpenSolver: Linearity check” message box from popping up. Moreover, the warning message… “Warning: The following constraints(s) do not appear to be linear:”… is incorrect. A simple “Run a full linearity check” will verify that the problem is in fact linear.

    Any ideas? We really need to rid ourselves of message boxes for the product to be useful in a serious way.

    Thanks for all your hard work, you’ve produced a gem!

    1. I have come across this issue before, which seems to be caused by numerical issues. I will email you version 2.0 to test; it has two improvements. The first is to better estimate the accuracy of numerical calculations so as to avoid false reports of non-linearity. The second is to completely skip the non-linearity check. Please let me know if it fixes your problem (preferably without manually turning off the linearity check!). Andrew

      1. I am also facing WARNING messages about non-linearity in the objective function as a consequence of excel numerical problems. Please, how could I seetin/configure Opensolver in order to not show this warning?

  8. I am new to VBA and I want (for my study) to use your open solver in it. It works great in excel as add in, but I am having trouble how to define everything in VBA. I have done the tools-> reference part and now I am able to solve an already defined problem. Now I am trying to tell openSolver in VBA what I have as objective cell, MINMAXVAL, decision varibles and constrains. I cannot make it work, even for small problems.
    At the moment I try to make in work for:
    min x+y (in B1)
    x (in A2), y (in B2)
    under
    x+2y (A4) >= 12 (in C4)
    3x+y (A5) >= 15 (in C5)
    So I typed code as follows:

    Private model As CModel
    Sub Macro1()

    ‘ Macro1 Macro
    Set model = New CModel
    Set model.ObjectiveFunctionCell = Range(“$b$1”)
    model.ObjectiveSense = MinimiseObjective
    Set model.DecisionVariables = Range(“$a$2:$b$2”)
    ‘the constraints need to still be added
    RunOpenSolver False
    end sub

    But I really get the feeling that I don’t understand the full program. So it could be done much more easier. Could you help? Or is this the way too go?
    Thanks a lot in advance
    Hidde

    1. Hidde: Good to see you are trying out OpenSolver. CModel is an internal structure that is over-written when you say RunOpenSolver, and so you cannot set up the model in this way. Instead, I recommend that you set up the model on the spreadsheet in the normal way, and then in your VBA make any (presumably small) changes you want to the model (such as changing values on the spreadsheet that give a constraint’s right hand side), and then call RunOpenSolver. If you really want to set up the whole model in VBA, then you should use the standard Solver commands which are documented here. You can set up the model using these Solver commands, and then solve the resulting model using RunOpenSolver. I hope this helps, Andrew

  9. 1) I need to solve an old ILP that has the decision variables split acros many ranges (for usability reasons). I run Open Solver on Excel 2003. I does not allow the split ranges. Variables should be in a unique range. Any way out of this?
    2) I have to always go through the xlma start, because, in spite of having all distribution files in the xcell add-in directory. Whe I start Xcell without clicking xlma nothing happens.
    Is all this the result of running it under Xcel2003?
    Very good work. Thanks a lot!

    Josep

    1. Josep: 1/ I don’t have Excel 2003, but I cannot see why it won’t allow split ranges. However, you can instead create a single range that contains all your decision variables, and then link the ‘real’ decision variables back to these new ones using formulae in the real decision variables cells. 2/ Under the About OpenSolver, you can configure OpenSolver to automatically load at startup; why don’t you try this? Let me know how it goes. Andrew

    1. Krishna: I suggest you find a tutorial on using the standard Excel Solver – OpenSolver provides equivalent functionality for LP/IP models. Andrew

  10. Hi,
    Everytime I run the opensolver, excel goes on not responding, but in the task manager it says the cbc is using memory. Is the model getting solved or did it completely crash?

    1. You can use the Solver Options menu to make CBC visible while it is running; this will help you work out what’s going on. Andrew

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