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. Hello,

    I am new to this excel problem solving world and trying to find the right tool for me. I have read about OpenSolver and a few other products such as What’sBest by Lindo and Excel Solver by FrontLine Systems. Can you please help me understand the differences between all three and recommend any other products if they are out there.

    Thank you.

    1. Firstly, welcome to the the world of optimisation. I haven’t used Lindo’s What’s Best, so cannot comment on this. I teach with Frontline’s Solver. Unlike OpenSolver, Solver can handle non-linear models, and also has a very clever upgraded version that uses their Psi engine to analyse the spreadsheet formulae, giving faster solve times for bigger models. They also offer simulation/risk capabilities, which look nice. IBM CPLEX also have an CPLEX Excel add-in. Hope this helps. Andrew

  2. Hello, I have a question about solving a large set partitioning problem with OpenSolver.I just solved a SPP with 32751 Variables and it worked in around 20 minutes I guess. Since OPenSolver is some kind of “Black Box” I would like to know which algorithm it is using while solving the SPP. Is it branch and bound or how is it working exactly?
    Thanks

  3. Hello,

    My problem is that Open Solver is giving me an error: A range of cells are specified as bin or int that are not decision variables.

    Any ideas how to fix this? Thanks in advance!

      1. Thank you, Andrew. There are no integer or binary constraints on cells that are not decision variables, hence the confusion on my end. Thanks in advance for any other suggestions you may have.

  4. I need to put two ranges in the space provided for decision variables. However, OpenSolver is picking only one range at a time. Is there any easy way out?

  5. Hi all,
    I use Solver for solving “simple” equations: every line (row)in my excel file represents 4 equations with 4 unknown values.
    The problem with the default Solver is that the software can only handle 100 variables which means 25 lines in my excel. However, I have >1500 lines in each file so I switched to OpenSolver.

    My problem: what to fill in in the “objective cell”?
    With the default solver it’s suffient to leave this field blank (and select “max” but is doesn’t make a difference when filling in “min”).

  6. I have been trying to collect statistics such as the time taken to solve the problem, the number of variables, constraints etc, but still haven’t found a way to do that. Hope that you can help me out. Thanks!

    1. Firstly, solve the problem once. Then, if you view the .lp file (using “View Last Model .lp file”), you will see how long OpenSolver took to create the LP model (and also its size), as in:
      / It took 0.7460938 seconds to build the model.
      / Model has 2 Excel constraints giving 8 constraint rows and 15 variables.
      You can then open this model in CBC (using “Open last model in CBC”), and solve it again by typing “solve”. CBC will then give you the solution time, as in:
      Optimal objective 819 – 7 iterations time 0.002
      Alternatively, you can write some VBA that does all this timing for you! Hope this is useful, Andrew.

  7. Hello everyone!

    I’ve been using this amazing tool to solve a MIP for my Master’s thesis and it’s been just great. Nevertheless, I would like to do some “kind” of Sensibility Analysis on the solution. Has anyone been able to do this up to the date?

    If not, has anyone been able to program a Macro that can solve the problem, for example 10 times with different parameters, and store the solution????

    Thanx!

  8. Hello,

    I am getting an error: “Warning: The initial worksheet calcualtion did not complete, and so the model may not be generated correctly. Would you like to try again?”

    This error is occuring when I am running some code that iterates through a number of different cases (same model, different inputs). The code usually runs fine until around 6-10 iterations, then I get this error which causes me to restart. I also have to reset the workbook calculations to automatic, as they are set to manual after this error.

    1. This error is something we have seen in Excel where the spreadsheet re-calculation fails. It seems to be an Excel bug. We try to force a recalculation whenever this occurs, but sometimes it still doesn’t work. We’d welcome ideas on how to work around this issue. Andrew

      1. Is there anyway to force recalculation using vba? I am trying to use opensolver to optimize a number of cases, but after this error (usually after 13 iterations) I have to manually quit the workbook. Is there a way to get it working again automatically, without quitting?

        1. You should not have to quit; I thought it normally fixed itself given a bit of time. But, yes VBA can force the workbook to fully recalculate, using Application.Calculate from memory (but you will need to check). Andrew

  9. I define the variables range as Sheet1!$H$3:$R$14, Sheet2!$H$3:$R$14 and I get an error when saving the model. I look at the code in the variable s I have
    =Sheet1!$H$3:$R$14, Sheet2!$H$3:$R$14
    Notice the “=” sign at the beginning!
    How do I correct this?

  10. my os is windows 7 and microsoft office 2007. I installed open solver in my laptop, it appears in the excel ribbon. and while trying to solve a worksheet model I got an error saying “Microsoft Visual Basic – Compile error: Can’t find project or library” and so many same type of errors are appearing. I request you to help me to sort this error.

  11. I am using OpenSolver to solve an IP problem with binary decision variable. I know that there are multiple optimal solutions, but OpenSolver by default only returns one of them. Is there any way to get one or more of the other possible solutions from OpenSolver? Ideally, I would like to find out how many optimal solutions there are to my problem and then cycle through them.

    Thanks!
    Daniel

        1. Fantastic – we have been wanting to become Mac compatible for ages! I would start by trying OpenSolver on a Mac, and seeing what bits work and what bits fail. There is Windows-specific code used to run CBC.exe, but most of the code should work. I will hunt down a copy of CBC for Macintosh; I know that it exists. Please keep in contact. Andrew

          1. Where do things stand with creating a Mac version? I’d volunteer some time to make it happen. I’m not a VBA pro but wouldn’t mind climbing a learning curve if someone can spend a few minutes coaching me.

            1. I am hoping to receive some beta Mac code shortly from one of our users. Would you be happy to test this for us (and fix any bugs!)? 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.