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,228 thoughts on “Help”

  1. Just a quick question (couldn’t find it on the site) —

    What is the maximum amount of decisions and constraints that OpenSolver can handle?

    1. There are no artificially imposed size limits, so it depends on the memory you have and the complexity of your problem. Hope this helps, Andrew

  2. Hi Andrew,
    I step up the model and when I clicked on Auto Model. There is an error which says ‘Couldn’t find objective and couldn’t find result’. When I clicked on Show/Hide Model, there is an error which says No solver model found on sheet.. My model is very big. It runs into 19586 rows and is not structured in LP format.What do you think could be the problem?

    Thanks!

    1. Preethi: AutoModel only works if the model is set up in a particular way. You should set up your model using the Model dialog. Hope this helps. Andrew

  3. Can any body help me. When I solve my model then this error occure…plzzzzzzzzzzzzz

    OpenSolver could not find an optimal solution, but reported
    No Solution found (unbounded)
    A solution has been generated, but may be infeasible or sub-optimal or both
    (CBC solver reported: Unbounded – Objective value 0.00000000)

      1. I’m experiencing the same problem, the model seems fine, and the function to solve is a simple linear equation. It seems that the solver does not search for parameters over 0. Possible?

        1. OpenSolver considers all possible values for the decision variables. If you turn on the “assume non-negative”, it will consider positive values only. Check your model carefully. Andrew

  4. Hi
    Thanks for a great product. It solved my ~1000 variable problem in a jiffy. The addon to Excel is easy and simple.
    I want some help in the following: My output rows contain values from 0-5. I want to count the number of rows having non zero value and use it in a constraint. Can you advise me?

    Thanks in advance
    Ravi

    1. Ravi, You will need to use 0/1 variables I think; I suggest you look up a book on mathematical modelling. Make sure you do NOT use an IF(); these do not work in Solver or OpenSolver (but can, I think, be used by Frontline’s Premium Solver, which presumably converts them to an 0/1 variable behind the scenes). Andrew

  5. Hello Andrew
    I was very excited to learn about OpenSolver and hoping to take an existing model currently being solved by Solver and use OpenSolver.
    My issue is that the entire existing model was set up using standard Solver commands in VBA (e.g. SolverAdd Funcition) and so forth. I have made sure to reference OpenSolver, rather than Solver in the active module.
    My questions are the following
    1. Do the standard Solver commands now have to be OpenSolver commands (e.g. OpenSolverAdd)?
    2. I am assuming the above is not true, in which case how do I call OpenSolver? I have removed the reference to Solver. Currently, my code is such:
    ‘Solve
    SolverOptions MaxTime:=100, Iterations:=100, Precision:=0.000001, AssumeLinear _
    :=False, StepThru:=False, Estimates:=1, Derivatives:=1, SearchOption:=1, _
    IntTolerance:=5, Scaling:=True, Convergence:=0.0001, AssumeNonNeg:=True

    I have tried placing RunOpenSolver False following this line, before and after the above line, and at the very beginning of the subroutine; but I always get the error “ Sub or Function not defined”. I’m missing something, but cannot figure out what. Should I be using the commands such as those listed in the RunOpenSolver code? If so, where should I place it? As a function, and call the function?

    Thank you very much, any insight is much appreciated!

    1. Thanks for your enthusiasm about OpenSolver. To answer your questions (1) the standard Solver commands work for building OpenSolver models (but not solving them). Then calling RunOpenSolver False should solve your problem. You should reference both Solver and OpenSolver, but that is unlikely to be your problem. I would double check you have OpenSolver loaded, and you have referenced it as detailed on http://opensolver.org/using-opensolver. Let me know how you get on. Andrew. PS: Why is AssumeLinear false? OpenSolver need this to be true.

  6. I am currently working on a linear problem that contains 2940 variables (~1000 binary, rest free) and it is taking quite a long time (14 hours and counting). I wonder if there is a way to approximate the time it takes to finish. Having enabled the “show iterations” but not fulling understanding it, can someone explain to me what the nodes and tree represent? Thank you!

    1. Problems like this can be very hard to solve. I suggest you Google “branch and bound” to get a better appreciation of what is going on. Hope this helps, Andrew

      1. Thank you for the quick reply! I read on a website where a problem with 100 binary variables would take a computer that is running at 1000 nodes per second many life times to finish. Does this mean my solution will go on forever?

        1. Benny: It all depends on how difficult your problem is. There is an art and science to building models that solve quickly. You can try increasing the integer solution branch and bound tolerance to see if it can find any sort of solution (not just an optimal one). Good luck, Andrew

        2. Benny,
          My program has approximately 6000+ binary constraints. I wanted to estimate the amount of time this program would take to run. Could you please tell me how long did yours take to complete? Did increasing the integer solution branch and bound tolerance help?

  7. I have downloaded Open Solver and am able to create models, however when I try to solve them an error message pops up saying: “Unable to find an external server.” How can I fix this? Thanks. Sarah

    1. I have not seen this error message before, sorry; it is not an error message that we have coded into OpenSolver. Are you perhaps saving your files on a network file server? Does this happen on other computers you try? Thanks, Andrew

  8. i’m searching about the solver basic theory and algorithm but i still not understand about how excel works manually…can someone help me ? i need for my thesis…thank you

  9. Hi, I have built many very large LP’s, and do so for a living. I have written a generalised front end for my models, which uses Excel to define the Classses of variables in the model, the members of these classes, and the tables which contain all of the data which populates the model. This process produces a large text file in MPS format, which is the whole LP for solving. My larger models have tens of thousands of variables and constraints, but I am looking for something that can be built into the middle of a Production Scheduling System utilising much smaller models at present. Can your solver(s) use MPS format input? This me http://www.linkedin.com/pub/alan-harrington/20/135/6b2

    cheers,

    Alan Harrington

  10. Hi Andrew,

    I’m dealing with a model whose objective function is nonlinear. If the option of ‘highlight the nonlinearities’ and ‘run a linearity check’ are selected, no optimum solution could be found. I’m wondering the nonlinear objective function is applicable for this software.

    Thank you very much for your help.
    Regards.
    Lluvia

  11. The Excel solver gives a report of the shadow prices (dual solution) under LP mode. Can we get the same report with OpenSolver?

    1. You can get the shadow prices (but no range information); check out the (relatively) new “Shadow Prices” option under the OpenSolver Model dialog. Cheers, Andrew

  12. Estimados:

    Tengo Office 2007 y windows xp servi pack 3, luego de seguir los pasos de instalación, y de habilitar las macros, me aparece el siguiente error en un cuadro de texto de Visual Basic:

    “La biblioteca de objetos no es valida o contiene referencias a definiciones de objetos que no se pueden encontrar”

    Me podrían ayudar a resolver este error porque directamente al aceptar el error me deriva al editor de Visual Basic y desde allí no se que hacer.

    Saludos y me gustaría mucho poder experimentar con esta herramienta.

    1. Google translate says you asked:I have Office 2007 and Windows XP service pack 3, then follow the installation steps, and enable the macros, I get the following error in a text box in Visual Basic:

      “The object library is not valid or contains references to object definitions that can not be found”

      I could help resolve this error because the error directly to accept me drift to the editor of Visual Basic and from there not to do.

      Greetings and I would love to experiment with this tool.

      Please search this site for comments on RefEdit, and repairing your Excel installation. I hope this helps, Andrew

  13. I have a model that does production planning one year at a time for five years. I set up the problem in OpenSolver for the first planning year. How do I change the contraints/variables/goal for the next four years using VBA without setting up the problem for each single year every time I do the production planning? Thanks.

    1. I would not use VBA for this, but instead have a formula on the spreadsheet for each constraint right hand side (RHS) that looks up the required RHS value for the user-selected year. You can do the same for the constraint coefficients if these change. If you want to use VBA, then I’d do the same thing, but use VBA to step thru each year in succession and remember the results; I did exactly this for the first ever OpenSolver project. Hope this helps, Andrew

  14. Hi,
    I’m using Excel 2007 and I found OpenSolver very powerful. But I do have a question. For the project I’m working on, I have to set up the model and call RunOpenSolver(False, True) both from VBA. Even though the Assume Linear Model has already been turned on, the warning
    “OpenSolver assumes the model is linear. However, Assume Linear Model is not turned on. Would you like to continue anyway (and solve the problem as if Assume Linear Model was turned on)?” appears every time. I think the reason probably lies in the BuildModelFromSolverData(). After is called, AssumeLinearModel is false. Is there a way to avoid such warning?
    Thank you.
    lin

    1. Thanks for your report, and for having a look at the code. There are two checks that are made, being either that “Assume Linear Model” is turned on (as happens in Excel 2007 and earlier) or that the engine is set to the Simplex method (Excel 2010) and later. I have just checked the code for all this, and it looks fine. What version of (1) OpenSolver and (2) Excel are you using? Would you be happy to email your spreadsheet to me at email hidden; JavaScript is required so I can check how it works on my PC? Thanks, Andrew

      1. Hi Andrew,
        That problem disappeared. I must be very careless yesterday. Thank you for your attention and great software. lin

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.