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 Andrew,

    I am having the same problem as Aswinray(see below) and i am curious if a solution for this is made in the meanwhile. Otherwise any ideas on how to supress it? I already have looked in the code but haven’t found any solutions for it.

    Kind regards,

    Jeroen Kars

    Aswinraj
    May 5, 2011 at 9:12 am · Reply
    Hi Andrew,

    I am currently using Open Solver for my thesis and I am calling the open solver from VBA. I need to iteratively find solutions for different data sets. So for some of the data sets there aren’t any feasible solutions. So when such a data comes up I have to manually press OK for the dialog to close and the program to continue reading my other inputs. Is there a option in OpenSolver to suppress these dialog boxes when an infeasible solution comes up. (using VBA)

    Appreciate your time.

    Thanks,

    Aswinraj
    . admin
    May 9, 2011 at 10:13 pm · Reply
    Aswinraj, There is no such option. I suggest you modify the OpenSolver code to track infeasible results. I’ll add this to our ToDo list! Can I ask what problems you are solving for your thesis? Andrew

  2. Having an issue where I am running an open solver model and it completes the compile part but once it goes forward from setting up the model excel simply locks up and freezes. I’ve tried to take a look at the cbc to see what is going on but I am not really quite sure what I am looking at here. It seems to be going through a lot of the lines but it is taking significantly longer due to a slightly longer constraint that has been adjusted (total vendors that can be chosen is decreased by 1). How long should I expect the analysis part to take and is there any specific reason why it is taking so much longer?

    1. Small changes can make problems much harder (slower) to solve. You may want to specify a larger Branch and Bound Tolerance of, eg 30%, if you are happy with a solution that is guaranteed to be within 30% of the solution. Bigger tolerances mean shorter solve times. Note that if your problem has no solution (as may happening when turning a <=5 into a <=4 constraint, for example), then it may take a long time to prove that. Andrew

  3. Hi,
    I’m using opensolver for a linear problem with 1680 binary variables. I didn’t find a feasible solution when solving it as an integer linear programming but it works with the LP Relaxation !.
    i have verified that this problem is not due to constraints and realized that the binary variables are at the origin of the prolem.
    By reducing the number of binary variables, i found a feasible solution. Is there a maximum threshold of binary variables?
    Any ideas about this problem?
    Thank you for your help

    1. Binary variables make problems hard to solve. Often a problem will have an LP but not an IP solution. There are no limits imposed by OpenSolver or CBC other than memory and time. I suggest checking your constraints carefully if you really believe there should be a solution. Andrew

      1. Hi Andrew,
        Thanks for your answer. I have deleted all constraints and kept only one (the easier). So, i have 1980 binary variables and 1 constraint. the LP solution gave only integer values (so not very “hard”). The IP is infeasible (error msg). So it’s not a problem of constraints.
        Thanks Andrew

        1. This looks like a CBC bug. I suggest you upgrade the cbc.exe file; I have added a note on how to do this at the top of this page. Please let me know how you on. Andrew

          1. I have upgraded the cbc file but the problem remain infeasible. May I email you the spreadsheet and the lp file?

                1. OK, please email me the spreadsheet (and LP file, please). And please confirm that (1) CPlex finds an integer solution for the LP file, (2) OpenSolver reports the problem as being infeasible, and (3) you are using the latest version of CBC that you downloaded and installed yourself. Thanks, Andrew

  4. I have the error below. However I downloaded new CBC, tried opensolver 2.1, 1.9 and 1.8 and the error remains the same. Any thoughts?
    Thanks

    “OpenSolver 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. Error Number = -2147220503

    1. This would appear to be a problem with CBC. Can you please email me your spreadsheet so we can investigate? a dot mason at auckland dot ac dot nz. Thanks. Andrew

      1. I’m pleased to hear that upgrading CBC fixed the problem. I’ve now added instructions on how to do this at the top of this page. Andrew

        1. Hi Andrew. I have the same error with binary variables. I have changed cbc and the problem is there yet 🙁

          1. Can you try the 64 bit CBC? That is sometimes more robust. If that fails, you may wish to send me the s/sheet so I can file a bug report on CBC (assuming that is the problem). Andrew. a dot mason at auckland ac nz

  5. Hello Andrew,
    I am stuck please help me…..I have problems using OpenSolver within VBA code.
    I have constructed the problem in Excel sheets using VBA. My objective function is in one sheet and each set of constraints are in a separate sheet. like 7 sheets in total.
    I have copies and pasted here part of my code that uses excel solver. what I was doing or what I thought I was doing is using regular excel solver with VBA code to set my objective function and variables and then wanted to press solver in OpenSolver to solve it. In my first version I had the whole problem constructed on one excel sheet( objective function, variables and constraints) however, Now that my constraints are in different sheets it does not work and when I solved it only solved for the set of variables that are on the last sheet and drops the constraints from other sheets….. can you help?

    I was not able to find a simple vba code for Opesolver to not have to use the codes for normal solver as below. Is there anywhere an example, like an optimization problem done in Opensolver so I could look at and read its code and learn how we can use open solver

    My part of code :
    Sub MYSolver()
    Dim obj As Worksheet
    Set obj = Sheets(“ObjFunction”)

    Worksheets(“objFunction”).Activate
    SolverReset
    SolverOptions precision:=0.001
    SolverOK setCell:=ActiveSheet.Range(“K2”), _
    maxMinVal:=1, _
    byChange:=Range(“$J$2:$j$5905”)

    SolverAdd cellRef:=ActiveSheet.Range(“$J$2:$J$5905″), _
    relation:=5, formulaText:=”binary”

    ‘Const1

    Dim exe3 As Worksheet
    Set exe3 = Sheets(“Macro1”)
    Worksheets(“Macro1”).Activate

    For o = 0 To 31
    SolverAdd cellRef:=ActiveSheet.Cells(373, 4 + o), _
    relation:=1, _
    formulaText:=21
    o = o + 1
    Next o

    ‘Const2
    Dim exe4 As Worksheet
    Set exe4 = Sheets(“Macro2”)
    Sheets(“Macro2”).Activate

    lastcol = exe4.Cells(4, Columns.Count).End(xlToLeft).Column
    For K = 4 To lastcol – 1 Step 16
    For j = K To 11 + K Step 2

    lastrow1 = exe4.Cells(Rows.Count, j).End(xlUp).Row
    lastrow2 = exe4.Cells(Rows.Count, j + 2).End(xlUp).Row

    exe4.Cells(lastrow1, j).Select

    SolverAdd cellRef:=ActiveSheet.Cells(lastrow1 + 1, j), _
    relation:=3, _
    formulaText:=0

    Next j

    Next K

    Thank you !

    1. I assume this is because the Solver VBA interface does not allow you to add constraints from another sheet. (Solver does not allow such constraints, so the Solver VBA interface may block them.) Are you able to test this? If this is the case, I suggest you build the model manually using OpenSolver, and then just set the data using VBA; is that possible for your application?

      1. Thank you very much for your help. I truly appreciate your help. If I use the OpenSolver Manually ( Use the form on the data >> OpenSolver tab) and specify objective function on one sheet and each constraint on a different sheet, it works!! However Im talking about over 2000 constraints at least so doing it manually is not possible I just tried a couple of them to check and see if it works and it did. To specify my question again what I understood was normal excel Solver does not understand a problem that is spread on different sheets but OpenSolver does! How can I use OpenSolver’s commands in VBA to make it read constraints from different sheets and understand they are all part of the same problem just like what happens when I use the OpenSolver form in the data>> Opensolver tab. The confusion for me comes from the fact that I can use excel solver’s commands and run OpenSolver at the end. If the commands are the same how is it that one understands a problem spread on different sheets and one does not. Should I be using a different command for OpenSolver?

        1. To summarise your question, you want to use VBA to add constraints to a model where the constraints are on different sheets. Your experiements suggest you cannot do this using the Solver VBA interface. OpenSolver does not provide any VBA interface for doing this either. However, you can do it manually, but it is not straight forward, as you need to work with low level data. This involves adding named ranges to the spreadsheet, such as “solver_lhs1” and “solver_rhs1”, whose values are references to ranges on the spreadsheet that contain the parts of the constraint. Also, “solver_rel1” etc give you the <=, =, or >= relation for a constraint (and also the bin/int options). You also need to set solver_num to be the number of constraints you have in. I suggest you download and use it to see how a model is stored internally, and use this to help write the VBA you need to add extra constraints to an existing model. Sorry we cannot be of more help, but rest assured that adding new functionality to support this is now on our TODO list. Cheers, Andrew

  6. Thanks for providing OpenSolver, but may I ask for some help in installing it.
    I downloaded the OpenSolver, extracted the files and double clicked on OpenSolver.xlam. All fine: The commands appeared and I could run an LP_model open in my Excel. But then I wanted to install OpenSolver permanently, have tried different storing locations for the files,last this one: C:\Program Files (x86)\Microsoft Office\Office14\Library\SOLVER. But nothing happens. What am I doing wrong?

        1. Thank your for this response – and for the OpenSolver in general; great program. But I still have a question (see also my mail under Help: Have a large LP where I have to try out different values for just one coefficient in the objective function; everything else the same. Can I use Quick Solve? If not can I somehow escape having to wait 10 min. for the setup every time?

          1. No, QuickSolve does not handle changes in the objective function coefficients. However, the next version of OpenSolver will give cost sensitivity analysis, which may help you. Andrew

          2. Unfortunately, no. This is not for any good reason, but simply because we have not needed this functionality. Note that the next release of OpenSolver will give cost sensitivity analysis, which may help you. Andrew

  7. Hi Andrew,
    I am trying to use OpenSolver fora linear assignment problem and I was solving for a problem with about 6000 binary variables. Even before putting in any of the constraints, it took the solver 12 minutes to come up with the result.

    My objective function was a profit maximization so all it had to do was to come up with zero for negative coefficient and 1 for positive coefficient.

    Should I expect like 10 hours of running if I put the constraints in? Do you think the run time was normal for 6000 variables or am I doing something wrong here ?

    If I switch to solver studio would it be faster?

    Thank you

    1. 6000 variables means doing 6000 spreadsheet recalculations. This can be slow on big spreadsheets. SolverStudio skips this slow step, and so should be faster. Andrew

  8. Just wanted to say AWESOME! Well done Andrew and also those who provided bits for you to use.
    Auckland University gave the world “R” and now we have this. Go kiwis!

    Matt
    Guangzhou, China.

  9. Hi I am woring in a project with 2200 variables The solver says the model is not linear,(I want to try assume linear model) but in a small version i was able to solve it, but for the biggest model I have error 13, what does it mean, how can I solve the issue.
    Thanks

    Fernando

  10. hi Andrew, I installed the open solver, I can see the icons, when I enter to the specific option, they don’t work, nothink happens. I have windows 8.1
    Thanks

  11. Wow this tool works great. I just ran a large set of numbers and it quickly found an exact solution. Thank you. I also like that I do not have to install anything. I can just click the xlam when I need it.

    1. If statements are no linear, and so do not work in OpenSolver. You need to use binary variables; see a book on optimisation modelling for more details. Andrew

    1. Add slack/surplus variables, and penalise them in the objective function. (See any standard linear programming book for more details.) 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.