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. Thank Andrew for your prompt response,
    Please elaborate on item 1 (making constraints cells that are binary and not part of the decision variables/changing cells). Below is an account of what I did and the details of the error messages I got:
    I set up my binary variables under constraints by having the 1st row as the binary variables represented initially by zeros (no calculation or formulas in these cells). The second row contains the formula/calculations that link the uncalculated cells in the 1st row (representing binary variables such that some of the cells with initial zeros with change to 1 after solving the model) along with other variables elsewhere in the spreadsheet. This procedure works with basic solver which is limited to size of problem I am dealing with. Below is the error message I get when I add these binary variables (the cells with no formulas/calculations) as part of my constraints by specifying that say K509:P509 must be binary:

    “Warning: an int/bin constraint has been set on cells that are not decision variables. OpenSolver does not support this yet.An error message will appear if you have selected to show the model”. Clicking ok twice the produces the error:

    “A cell specified as bin or int could not be found in the decision variable cells.”
    I then moved/copied my binary variable cells under constraints to the decision variables area, and specified that both the decision variables and the relocated cells should be binary and got another error saying “LHS of constraints must have only 1 area” instead of say “$k$221:$p$426, $k$421:$p$426”

    The warning message above seems to suggest that opensolver does not support having binary variables if they are constraints and not part of the decisions variables (if I understand it correctly). Please advice on how I can resolve the issue.

    1. If say B6 has a formula that must have be binary valued, use OpenSolver to add a decision variable cell, say A6, and then use OpenSolver to add two constraints: (1) A6 is binary, (2) A6=B6. Andrew

  2. Hi, please help with the following 2 questions:
    1. Does OpenSolver have provition to include binary variables that are not part of the decision variables/changing cells (e.g., constraints that are binary)?

    2. After building a spreadsheet model (mathematically formulation) and using OpenSolver optimization engine to solve/implement the details of the math formulation, is there some kind of developed software/tool or a way to create an interface for users without having to learn programming? For example, creating something that allows user to input data such that this data communicates with both the spreadsheet model base (maths formulation) and OpenSolver behind the scene, then display the output or outputs back to the user.

    Will really appreciate any assistance, particularly with regards to item 2 for someone with no programming knowledge or background.

    1. To make a calculated cell integer or binary, add an integer or binary decision variable and a constraint to make it equal your calculated cell. I suggest you just build your interface on the model sheet with clearly indicated user input cells that feed values and options into the model that change constraint coefficients etc. Andrew

  3. Hey,

    i was wondering how many parameters can the solver optimize for one optimization? what exactly is the advantage over ms solver? is it also compatible with excel 2013?

  4. Hello, I need your help.

    when trying to use OpenSolver 2.5.4 I get the following error:
    Permission denied (at line 28860)
    Source = OpenSolver, ErrNumber=70

    do you happen to know what this is about?

    thank you for your help!

    cheers,
    Yael

    1. This is possibly because one of OpenSolver’s internal model files has been left open. Pl;ease try quitting Excel, and starting again. If this fails, look in your temp directory (which you can find using echo %temp% at the command line), and delete any recently created files (such as cbc.bat, model.lp, log1.tmp, any .nl files, etc). Also, can you tell us what you were doing, or if you had an OpenSolver errors, around the time this happened? What solver were you using? Thanks, Andrew

  5. Hello, I am getting the following error time and time again:
    Permission denied (at line 28860)
    Source = OpenSolver, ErrNumber=70

    do you know what this is about?

    thank you for your help.

    cheers,

    yael

    1. This will be something to do with your rights as a user. OpenSolver normally works fine for all users, but maybe you have downloaded OpenSolver into an unusual place; into your documents folder normally works ok.

  6. Hi,

    I have a schedulling LP with 11000 binary variables. It work perfect with the basic constraints but when I put an additional constraint that says some workers cannot work more than 2 sundays per month the open solver says “didn’t find a feasible solution”.

    I’m sure the constraint is right in term of an LP

    I also tried with all the advices that you made before like relaxing the number of variables, using the lates version of cbc, tried with the 64bits cbc, etc

    Would you help me?.

    Thanks

    Regards,

    1. To test your model, you can try creating a manual solution in the spreadsheet (perhaps for a smaller instance) and using this to demonstrate that your model’s constraints are correct. Cheers, Andrew

  7. Good morning.
    OpenSover works with MS Office 2013.
    I have a problem with a variable (44130 refObj.Text = “”) not definied.

    Thank you.

    1. Thanks for the report. What version does About OpenSolver report you as using? And what were you doing when this error occured? Andrew

  8. Hi,

    I am working on a project to use macros to run the open solver without opening the user interface and add the constraints and objectives by hand. I would like to know how to clear the model. I have tried SolverReset but it does not work and every time I run my code it adds new constraints but the old constraints are still there.

    I really appreciate your help!

  9. Hi, is there a way to clear the model before creating a new one using VBA? I tried SolverReset but it does not work. OpenSolver still keeps the old constraints.

    Thanks!

  10. Hi,

    I wish to kindly ask the following 2 questions about Opensolver, which is proving really useful:
    (1) Is there a menu similar to a reset button on basic solver (to reset everything to zero before clicking on “solve”)?
    (2) Is there provision to include binary variables that are not part of the decision variables/changing cells but rather under constraints (constraints that have binary variables)?

    I look forward to your help.

    1. You can clear your models using the “Clear Model” button in the latest release. You cannot directly set an expression to be binary. However, you can add a binary decision variable and add a constraint forcing it to be equal to the expression that you want to be binary valued. Hope this helps, Andrew

  11. Hi,

    I sent a question about using SolverStudio instead of OpenSolver or along it.
    Can you please comment? thx

  12. Hi,

    I am just making sure that my other post from yesterday arrived?
    I can’t locate it, and it was quite long 🙁
    I really need a feedback to know what to do…
    thx!

  13. Hi,

    I used the program in the past and loved it!

    Today I am working on a vast optimization model and as it looks like- opensolver will need hours to run it.

    I read in other posts about the SolverStudio. I downloaded it and tried to work with it but unfortunately I found out that there isn’t a menu to build the model like in the OpenSolver.
    The menu provided there (as far as I understood) can’t define all the parameters- for example: how to set the object cell- max a cell.
    I don’t know programming languages, so setting a problem only by code is a real gap for me.

    If I misunderstood something and there is a way to build the function easily I will appreciate if you can guide me!

    Another thing-
    I think that SolverStudio can provide additional ability to my model which OpenSolver can’t.
    I have a dynamic range of variables (I download information from the web and according to the amount and type of data downloaded the pivot tables changes) so creating a fixed model causes it to be extremely big and not always necessary. I saw that SolverStudio can use the Offset function to limit the variables and constraints to fit the existing problem.
    Will really appreciate any support! if I could send an example and then according to the answer I will keep building the model it will be great!

    thanks!

    1. You are correct that SolverStudio requires a model to be built in text, wbich requires some learning. Using AMPL is probably easiest, but AMPL is comercial and so you either need to buy it or run it in SolverStudio via NEOS (which works fine but does result in your model becoming publicly visible). PuLP is free… looking at the examples will hopefully show you it is not too hard. And yes SolverStudio works with dynamic named ranges defined using formulae. Hope this helps. Andrew

    2. You may also wish to try the new experimental version which allows you to solve in the cloud using the NEOS CBC solver. This works differently in that it reads the sheet formulae, which can be faster. We would love to know if it works for you. Andrew

      1. Hi Andrew, thanks a lot for your response!

        1) If I choose to use your suggestion of using the cloud solver, will it be public/available to other users?

        2) is there any chance I can send the help team an example file to model in code and I will repeat the process for all the rest of the file? the formation is the same (2 power pivot tables side by side with variable tables below them and a calculation table below these tables).

        thx

        1. The cloud solver NEOS keeps a record fo all submitted models. Your model gets converted into AMPL and submitted to NEOS, so yes, an AMPL representation of your model will be publicly available for people to FTP out of NEOS. If you want a model built, please contact Dr Stu Mitchell, our commercial support partner for SolverStudio. Andrew

          1. Hi,

            In OpenSolver-
            Can I declare cell D1 to contain the phrase “A1:A10” (which is my RHS) and D2 (which contain B1:B10, my LHS), so that when I use OpenSolver and enter my constraints I would type D1=D2 instead of A1:A10=B1:B10, and the software will recognize that I want to set the constraints on A1:A10 & B1:B10 and not D1&D2?
            *like indirect function*

            The same for in variables-
            can I declare a name to the table I use for my variables (G1:g20) as “var_tbl”, and in the opensolver menu I will write var_tbl instead of G1:G20?

            It is possible if I use SolverStudio in code but if it is also available here it will solve me the need to do it in SolverStudio.

            1. You cannot use the ‘indirect’ approach but you can define named ranges and those names will show in the Model dialog (in the latest version). If you have a model that changes size, just add the maximum number of constraints you could ever need, and set it up so these are satisfied (eg 0 <= 0) when you have less data. Hope this helps. Andrew

  14. Greetings,

    I have a very large problem and even waited 7-8 hours to set up the problem. (I am running the model on 64-bit.)But then I noticed that when the solution screen came and i got the error that “cbc.exe has stopped working”. What is the reason for that?

    Thanks in advance for your help.
    Best,

    1. Btw I got the OpenSolver Error Message saying:
      “The CBC solver did not create a solution file. No new solution is available. (at line 12300) (at line 19450)

      ErrNumber= -2147220503

    2. A problem as big as yours would work much better in SolverStudio… 7 hours to set up is way too long! However, that aside, it looks like Cbc crashed. Please make sure you are using the very latest experimental OpenSolver release as that should run the 64 bit CBC as it checks the operating system bitness. Or you could be one of the first to try our new CBC on NEOS. This builds the model differently and so may be faster. Let us know how you get on. Andrew

      1. Dear Andrew thanks for your quick response!
        I’m going to keep your advices in mind and try CBC on NEOS and SolverStudio.
        Then I am going to share my experiences.

        Btw, I made some performance tests on CPU&Memory usage by shrinking the model size and noticed that CBC is most probably crashing due to the lack of memory. Because while setting up the problem, CPU is working a lot but as CBC starts memory usage climbs significantly. As I understand at that process, model is transferred to local and therefore memory faces with difficulty.
        Is there any way to break that transferred into smaller pieces so that computer memory can handle?

        Thanks again for your kind held.
        Best,

        1. OpenSolver writes the model as a .lp file. This file can be viewed using the Opensolver menu. As this file takes a long time to create, I suggest you make a copy of it. Then you can experiment with running CBC from the command line (again available from the Open Solver menu) and see whats going wrong. Andrew

          1. Dear Andrew,
            Couple of months ago you had advised me to solve the model (which takes 1.5 hours to even create set up file) in SolverStudio.

            I followed your advise and now I would like to share my real life experience about such a big model.
            While OpenSolver was solving my large problem in 2-2.5 hours (including setup and solution), SolverStudio GAMS formulation reduced the solution time to 2 minutes. I’d like to take this opportunity to thank everyone who developed such a tool. Also, SolverStudio greatly quickened up NEOS solver use. It was kind of painful to NEOS solver on its own…

            Here is the related question:
            Although NEOS Solver completed the task and Solver Studio downloaded the GDX results file, while reading the results, I got an error message saying: “Error executing model code: Bad CRC-32 for file ‘out.gdx'” and lists some lines below the error message. And as a result, outputs are not exported into excel.

            Have you ever come across with such a situation?

            Thanks for your help and effort.

            Best,

            1. Thanks for your experience; 2 hours to 2 minutes is a good result! I have not come across CRC errors; this will be GAMS reporting the error, not SolverStudio. And GAMS produces the file; very strange! I can look at it later this month if you like to email the file to a dot mason at auckland dot ac dot nz. Cheers, Andrew

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