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. I would like to execute Open Solver from VBA rather than manually from Excel. I can’t seem to find how to do this.

    Thanks

  2. Hello,

    Is error 1004: The specified value is out of range. (at line 23520) fixed?
    Back in October it was said that this occurs because of a limitation in Excel limiting the size of the rectangles added to a sheet to highlight a cell range when showing a model. I will add fixing this to our to-do list. Thanks for the report, Andrew

    Please let me know. Thanks so much for your work,
    Esteban

    1. It has been fixed in our beta code, but not yet released. This error does not impact models being built and solved, only how they are displayed (for really big models). Keep an eye on the website for the next release. Thanks for your interest, Andrew

  3. Hi,

    First: Great Work!

    I haven’t tied it yet, but is it possible to run two instances of excel and solve a problem in each instance simultaneously? Thanks, Axel

    1. OpenSolver works via files, so it cannot run two optimisations at the same time because the two runs will overwrite each other’s files. Is this a feature people want? We could make it work if there is lots of demand. Andrew

      1. I don’t know if other people could use it. It would have been a good feature but it isn’t very important.

        I experienced something else:
        The time opensolver needs to build its model, is very dependent on the file sizen even if there aren’t any references to sheets with much data. I think the problem is, that opensolver searches for any equations in the whole workbook which influence the objective cell. Is it possible to limit this area (e.g. one sheet)?

        Thank you very much.

        OpenSolver helps me so much in analysing different aspects in my thesis about district heating systems.

        1. I’m pleased OpenSolver is working for you. OpenSolver does not analyse the spreadsheet as such, but simply does lots of repeated calculations of the spreadsheet with different values in the decision variables cells. If your spreadsheet is very big, then Excel can take a long time to do these calculations. Switching to SolverStudio (a free download from http://solverstudio.org) will give you a much faster system for big problems like yours, but will require you to learn a modelling language. Cheers, Andrew

  4. Hi,

    Firstly, Thanks a Ton for your help. Open Solver is an Excellent Tool.

    I’m using MS Excel 2003 & working on my office laptop. I want Open Solver to appear on my excel start-up:

    I have extracted the .zip file (Open Solver 21.zip) & added the contents in the following directory “D:DataBSaravanarApplication DataMicrosoftAddIns” , but still Open Solver is not appearing during excel startup.

    1. Am I missing any step here ?
    2. Am I using an advanced Open Solver Version ?
    3. Am I working in the correct folder. Because I could not see any other add-ins in the aforementioned path “D:DataBSaravanarApplication DataMicrosoftAddIns”

    Thanks,
    Saran

    1. I have not used Excel 2003 for ages, sorry. However, the standard zip OpenSolver download the file OpenSolver.xlam (with a .xlam extension); such .xlam files are not recognised by Excel 2003. We no longer support Excel 2003, but if you search the OpenSolver comments for “Excel 2003” you may get some ideas that help you get this running. Sorry I cannot be of more assistance. Cheers, Andrew

    1. This indicates a bug in CBC (perhaps because it is running out of memory during a large branch and bound run). You can report this to the CBC team; see http://list.coin-or.org/mailman/listinfo/cbc. Please save the .lp file that OpenSolver creates as the CBC programmers may want to see this. I have found you can avoid some of these errors by using the 64 bit version of CBC; the next version of OpenSolver (which will be out within the next few weeks or so) includes a 64 bit version of OpenSolver. Sorry I cannot be of more help, but I am enroute to a conference at the moment. Cheers, Andrew

  5. Good afternoon

    I received an error message with the following information:

    Unrecognized relationship for constraint(unknown) alldiff

    Source=OpenSource Model Build, ErrNumber = -2147220504

    Does OpenSolver solve linear models with a combination of different types of decision variables? As background, my model contains four decision variables. The model is a routing algorithm designed to determine a sequenced tour using two modes of transportation. The first two binary decision variables are associated with modes of travel, the third binary variable is utilized for the either-or condition associated with choosing a single mode, and the fourth is a sequencing integer decision variable used to order the tour.

    1. OpenSolver does not work with AllDifferent constraints. I suggest you try an integer programming formulation. Good luck, Andrew

      1. Hi

        I have a question on how to formulate a problem using the alldiff constrain. It was said before that the alldiff function is not supported by CBC solver, but is it supported by any other algortihm? Since alldiff is slectable in opensolver, there must by some way to use it, right?!?

  6. Hellow Andrew
    I have the same Error of Nick “” Microsoft Visual Basic pops up with an error which reads as follows “Compile error: Can’t find project of library.”””
    Do you have a solution for this problem?
    Thx

    1. This is almost certainly a problem with the RefEdit control. Please check the references using the VBA editor (Tools…. References…) to see if any are missing. If you see “Missing: Ref Edit Control”, then please try unchecking that item. You can also try repairing your Excel installation; for me this is under “Excel Options” “Resources” “run Microsoft Office Diagnostics”. Please let me know if this work. Andrew

  7. I can’t figure out how run OpenSolver 2.1 in Excel 2003. Double clicking on the extracted OpenSolver.xlam doesn’t work, which is not surprising. Must I convert it to xla (and how do I do that?) or is there another version for 2003 that I need to download? I read on the site that 2003 is supported. Please help?

    1. I’m sorry, but you are on your own with Excel 2003 now. OpenSolver has code to support Excel 2003 in it, but we have stopped testing this now. It should still work, but you will have to find someone with a newer version of Excel to convert it to an older file format. Please let us know how you get on and the steps you follow; I’m sure others will want to know. Andrew

  8. Thanks for the great solver. I have a question that what heuristic approach you use in OpenSolver (i.e. Genetic Algorithm, Linear Programing, Ant colony or any). Also, could you please give me source code OpenSolver I try to find but I couldn’t. Thanks again

    1. Ant colony optimisation … please no! OpenSolver uses the COIN-OR CBC linear programming solver. The source code is available… open your VBA editor to see it. Andrew

  9. Somebody knows which is the sub that the button calls?
    I need to use in a VBA sub, I try “RunOpenSolver False” but it didn´t solve integer problems.

      1. Thank you for your attention, I was using a previous version and I think that was the problem. I downloaded the new version and It worked!
        Congratulations for your work, it helps to disseminate the culture of optimization!

  10. Hi,

    I have a 50,000 variable and 5 constraints “supposedly” linear integer programming problem. However, some of the constraints involve ‘vlookup’ and ‘countif’ statements which might make the problem non-linear. Opensolver works beautifully on the problem and also provides me with a consistent solution every time I run the problem, but just before providing the solution, it generates a warning saying “Problem might be non-linear”. I am confused about the mixed message – the warning as well as the solution to a so-called non-linear problem because I thought Opensolver only solved linear problems.

    Any inputs?

    Thanks!

    1. OpenSolver assumes the problem is linear. vlookup and countif functions typically mean this is not the case, but OpenSolver cannot determine this during its initial testing of the problem. However, if OpenSolver detects at the end of the solve that the values it expects to see on the sheet (assuming a linear model) are not the values it gets when it puts the ‘optimal’ solution onto the sheet, then it produces the warning you are seeing. I suggest you check out a book on integer programmings, and find another way to set up your problem that avoids the vlookup and the countif. Or, you can buy one of the advanced Solver products from frontLine which will do this automatically for you (I gather; I have not used these). They also provide algorithms for non-linear problems, but these typcically cannot guarantee the best solution has been found. Hope this helps, Andrew

  11. Issue when using OpenSolver. Press the Model button and the following happens: Microsoft Visual Basic pops up with an error which reads as follows “Compile error: Can’t find project of library.”

    In the background OpenSolver has opened up and I can input the fields for objective function, however when I try entering constraints, there aren’t any symbols available.
    Selecting options, save model or close does nothing. Only way to close it is to close MVB which follows with the error: “This command will stop the debugger”.

    Moved folder to program files and nothing seems to have changed. Can open cbc which shows version, build date, etc… So don’t know what to do.

    Any help would be appreciated.

    1. My guess is you have a problem with your Excel set up. Try repairing Excel and/or looking for any missing references under “Tools” “References” in the VBA editor. Hope this helps, Andrew

  12. Hi I have downloaded opensolver for mac and doubled clicked the zip file and moved it into my microsoft location. but when i click opensolver.xlam nothing happens.
    When I open the normal excel only the normal solver is available.
    What do I need to do to get it working again?

  13. I have used opensolver and I find it very useful. Now, I have another problem that has some “if” statements in my constraints that depends on decision variables and so oepnsolver complains that the problem has become non linear. Can you suggest a solution? If there a work around to continue to use open solver for such problems? Is there an alternate tool?

    1. You need to reformulate the models using 0/1 binary variables. I suggest you look at an optimisation modelling textbook to see how this is done. Cheers, Andrew

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