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. I wasn’t able to find my comment below (says awaiting moderation after more than 24 hrs).

    Hi,
    Q1. I have a big model to assign people to jobs using binary values as solver output (1=assign, 0=don’t assign). The objective function eqn is set for a specific number of people and jobs (and so are the constraints and variable/changing cells). For example, 10 people and 10 jobs. When I explore a different situation/problem in terms of numbers of people and jobs within the same big model (e.g. 4 people and 4 jobs), OpenSolver gives results even when no values (zero values/default values) are entered for person 5 to 10 and jobs 5 to 10. How can I get solver to display no results (or zeros ) in the variable/changing cells for which there are no values entered without setting different models?

    Also, I clicked on “View Last CBC Solution file” where there is a list of values in the 3rd column (second column shows list of 1s and 0s). Q2 Are the values in the 3rd column the objective values that CBC found before finding the optimal obj value shown at the top? Q3 Under “View .lp file, it says “It took 7.983…E-02 seconds to build the model. Does this mean the solution time is say 0.078 sec from time of clicking solve? (this is pretty fast!). Thanks

  2. Hi,
    I have a big model to assign people to jobs using binary values as solver output (1=assign, 0=don’t assign). The objective function eqn is set for a specific number of people and jobs (and so are the constraints and variable/changing cells). For example, 10 people and 10 jobs. When I explore a different situation/problem in terms of numbers of people and jobs within the same big model (e.g. 4 people and 4 jobs), OpenSolver gives results even when no values (zero values/default values) are entered for person 5 to 10 and jobs 5 to 10. How can I get solver to display no results (or zeros ) in the variable/changing cells for which there are no values entered without setting different models?

    Would really appreciate your help.

  3. As my problem grows larger, I see discontinuity in solution and this could be due to conditioning.

    I would like to check the condition number of the problem being solved. Is it possible to pull out the problem in a standard matrix form and any documentation on how to see it? I believe this should already being done in .lp file but I do not know how to visualize it.

    Thanks, Raj

    1. You can access the .lp file using the OpenSolver menu (which just opens a text file with a .lp extension). Then, you can use any tool you can find to analyse the matrix – this is not something i have done, so please let us know what you end up doing. Cheers, Andrew. PS: You might also want to check out the CBC help information (available at the CBC command line) to see if it can report what you want.

  4. I have a follow up question from Brit’s on December 27, 2013. I am using the suggested strategy to solve in multiples of 5,000 – which works perfectly. However, I have another column, called “savings”, that is based on the solution.

    When I had multiples of 1 – I was able to solve in a way that all numbers in the savings column were equal to one another. However, now that I am solving in multiples of 5,000 – that is not possible. What I would like to do is solve this in a manner where each number in the savings column is as close as possible to the rest. Do you have any ideas on how to formulate a constraint that will help accomplish this?

    Thank you,
    Greg

  5. Hi,

    I am having a problem getting solver to find cbc.exe. It says it is not in the solvers folder, but it is… I extracted all the files from the zipfolder and placed it into my addins in microsoft under program files, but I still cannot get solver to recognize this engine. I also tried to download just the cbc.exe file and repeat the opensolver installation, but nothing is working.

    Any ideas? Thanks 🙂

    1. Can you please tell us what “About OpenSolver” shows when it lists the various solvers… what does it say for CBC? Also, what does it list for the OpenSolverFile? Have you tried installing outside Program Files… Windows can sometimes stop programmes running if they are 32 bit put in a 64 bit Programs Files, and vica versa. Please let us know how you get on.

      1. Hi Andrew,

        I found a solution to my problem with your suggestion of looking at opensolverfile.

        I then moved the solvers folder to the same folder and it worked.

        Thank you!

        1. Pleased it worked. It is indeed important that the unzipped OpenSolver folder stays intact, and that individual files or folders are not moved elsewhere.

  6. I have used Solver native to Excel to solve this problem and when I try to run Open Solver I am receiving the following Error message:

    OpenSolver 2.6 encounter an error:
    The specified solver, CBC could not be found. Make sure it is correctly installed or try another solver (at line 2810)

    Err Number = -2147220503

    Thanks for any assistance you can provide

    1. Can you please tell us what “About OpenSolver” shows when it lists the various solvers… what does it say for CBC? Also, what does it list for the OpenSolverFile? Please let us know how you get on.

      1. Hi! I get the same error message. When I browse the Solver Engine, it says when I select COIN-OR CBC that it is “Unable to find CBC (‘cbc.exe’) in the Solvers folder.” The Solvers folder is right there and the CBS is also in the corresponding sub-folder. Why OpenSolver can’t find CBC? How can I fix this issue?

        Any help will be greately appreciated,

        Regards,

        Mario

        1. Sorry about this issue. Can you please email the text contents of your About OpenSolver window to email hidden; JavaScript is required so we can see where the files are. Thanks, Andrew

          1. Hi Andrew

            Unfortunately I have the same error message (ErrNumber = -2147220503). See details from About OpenSolver below:

            —————————————————————————–

            Unable to find CBC (‘cbc.exe’) in the Solvers folder.

            No Gurobi installation was detected.

            Unable to find NOMAD (OpenSolverNomad.dll) in the `Solvers` folder (C:\Users\danpearson\Documents\OpenSolver\Solvers\win32)

            Unable to find Bonmin (‘bonmin.exe’) in the Solvers folder.

            Unable to find Couenne (‘couenne.exe’) in the Solvers folder.

            OpenSolverFile: C:\Users\danpearson\Documents\OpenSolver\OpenSolver.xlam

            ————————————————————————————————

            I’m using 32 bit Windows and the CBC file is called “cbc.exe” in the win32 folder. I’ve checked that all files have been downloaded and unzipped into the same folder and have also tried repairing excel. I’ve also opened the “cbc.exe” file.

            Is there anything else I need to try?

            Many thanks
            Dan

            1. Sorry it is not working. We have found the issue which was specific to 32 bit Windows. We will be uploading a new version very shortly. Thanks for your patience with this. Andrew

              1. No problem, thanks for your help. I’ve just updated to v2.6.2 and this now seems to be working fine for me.

                Thanks again
                Dan

              2. Have you found the issue for 64 bit systems as well? I upgraded to v2.6.2 and am still getting the same error as as Mario and Dan. The details from my About OpenSolver window is identical to Dan’s as well. I have all of the OpenSolver files saved under the AddIns folder on my Cdrive.

                Do you know what could be wrong?

                1. Andy: We were not aware of any 64-bit issue. This will be another problem, and not the one we addressed. Please post the contents of your About box as a first step. Please also try double clicking the cbc.exe file in Solvers/win64, and check that it opens and shows text starting “Welcome to the CBC MILP Solver”, and then gives you a “Coin:” prompt that you can type into. Please also try right-clicking the cbc.exe file, choosing Properties, and see if the file is “Blocked” (indicated by an Unblock button being available). If it is, please click Unblock and try running it again (both by double clicking cbc.exe and from within OpenSolver). Please report back on what you find. Thanks, Andrew

                  1. Andy: Thanks for the looking into this, and confirming that your installation had somehow ended up with folders in the wrong place. Pleased it is working now. Andrew

  7. Hi!

    Thank you for OpenSolver, it’s great. I was using version 2.6 on my Mac and it was working fine, but I’ve upgraded to OS X Yosemite and updated Excel 2011 to version 14.4.5. Since then, I get this error when I try to solve a model with OpenSolver: Compile error: Method or data member not found. The debugger highlights this line in the code:

    2252 f.width = f.TextBox2.width + 2 * f.TextBox2.left

    When I close the debugger, I get “Application-defined or object-defined error.”

    I’m not sure which update broke OpenSolver (OS X or Excel), but thought I would let you know of the issue.

    Thanks again!

      1. Hi – I am encountering this same issue with “Method or data member not found”. Can you share any information on how to fix this? Thanks!

        1. We haven’t yet been able to figure out the cause of this. The main problem is that we are unable to replicate it after trying on multiple machines, but we are still trying to find the cause.

          You might like to try the steps listed here to see if this fixes it:
          http://www.rondebruin.nl/mac/mac004.htm

          If anything works please let us know

          1. I’m having the same problem. Installed OpenSolver for the first time and run into the error “OpenSolver: Compile error: Method or data member not found.”

            The debugger highlights this line in the code: 2252 f.width = f.TextBox2.width + 2 * f.TextBox2.left

            1. We are still unable to reproduce this on multiple machines, but it’s clearly a problem multiple people are having.

              For anyone that has this problem, can you please try commenting out the lines around this area so we can try to figure out the problem? Start with the problem line, and then move to some/all of lines 2244 to 2262 to see if you can get rid of the error with some of these lines missing. Either let us know here how you go or email “a DOT mason AT auckland DOT ac DOT nz”

              A temporary workaround is to disable the quick linearity check in OpenSolver options, but make sure either your model is linear or you have selected a non-linear solver before solving after disabling this.

    1. Alexei. Firstly, what version of OpenSolver are you using – the latest v2.6? Secondly, you have 18737 variables and 13656 constraints; that is a large model for OpenSolver. http://SolverStudio.org (also free) would be much better for a model of this size. Once you confirm your OpenSolver version, we will look into the overflow bug. Andrew

      1. Andrew, you are right, I was using 2.1 version. I’ve installed the last one and I’ll try to solve my model again.
        SolverStudio seems to be much more complicated… But I will try to cope with it.
        Thanks, you’re genius. 🙂

  8. Hi Andrew,
    Thank you for the prompt response.I’m not sure I understand your response regarding using the solver interface.Maybe I can clarify what I wish to do. I can use OpenSolver directly to add and delete constraints,click solve, etc. I now wish to control the OpenSolver buttons indirectly through writing macros in VBA that mimics the clicking of buttons such as delete constraint,add constraint, etc. I was able to find some documentation about the Solve function in OpenSolver in relation to VBA code. I wish to ask if there is similar documentation about controlling other mouse clicks in OpenSolver through VBA and where I can find it.Apologies for any confusion.

  9. Hi Andrew,

    I wasn’t able to locate my comment as noted below: please help

    I wish to kindly ask where I can find some documentation regarding how to add and delete OpenSolver constraints using VBA language, in relation to creating an interface to enable and disable some constraints without exposing the user to OpenSolver but giving user the flexibility to turn some constraints On and Off. That will be very much appreciated.

    Secondly, I wish to also find out if the bugs regarding OpenSolver (version 2.1) error message below has been resolved (I am using both Excel 2007 and 2010 in 2 different computers) and wish to very much stick with OpenSolver, which I find to be fantastic. The error message reads:

    “This application has requested the Runtime to terminate it in an unusual way. Please contact the application’s support team for more information.”
    “OpenSolver has 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, ErrNumber = -2147220503”

    When I rivert back to my original LP model with a few variables that I initially used to scale it up incrementally, I do get a solution with no errors.

    Thanks in advance for your help and expertise in creating this fantastic tool (I wish to stay with it).

  10. Hi,

    I wish to kindly ask where I can find some documentation regarding how to add and delete OpenSolver constraints using VBA language, in relation to creating an interface to enable and disable some constraints without exposing the user to OpenSolver but giving user the flexibility to turn some constraints On and Off. That will be very much appreciated.

    I wish to also find out if the bugs regarding OpenSolver crashes (version 2.1) have been resolved (I am using both Excel 2007 and 2010 in 2 different computers) and wish to very much stick with OpenSolver, which I find to be fantastic.

    1. You can add/remove constraints using the Solver (not OpenSolver) API. However, I would recommend having constraints that you turn off (by increasing the RHS of a <= constraint, for example). I am not aware of any major outstanding issues; there are a few minor fixes coming in the next release (along with many more solver engines). Is there a particular bug you are encountering?

  11. Hello, guys!
    I would like to know whether it is possible to set several models of opensolver in one sheet and get all work one by one. For example, my issue is how many of what product to produce in order to reach maximum quantity of products in total. First step, I need to get the result with available raw material (constraints) in warehouse. Each week I receive more materials, second step, I need the result with remaining stock from first step plus new materials arriving second week, third step, remaining stock plus new materials arriving third week and so on (let’s say for 15 weeks). I want weekly optimal quantity of finished products to reach maximum total quantity with one click on “Solve”.
    How to set this kind of model to run opensolver several times by weeks?

    I appreciate your response,

    Thanks

    1. You should be able to do all of this in one big model. Also, solving each week independently will not be optimal (and cannot be done with 1 click of Solve!). Hope this helps, Andrew

Leave a 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.