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. When I use the Quick Automodel button there is a message: Run error 91 that interrupts the automodel process. How can i solve this problem?

  2. Hi Andrew

    Following is a very brief summary of the approach I am using to solve large non-linear problems with OpenSolver. I can furnish more details (real examples etc)if required later.

    A linear relationship between variables X, Y, Z is of the form
    Z = AX + BY + C, where A, B and C are constants. An optimisation problem with any number of such linear relationships is solvable in one go using LP. An initial condition is not required.

    If a non-linear relationship exists of the form Z = F (X,Y,…) where Z is convex in the valid range of X and Y with an initial condition Z0 = F(X0,Y0), then A0 = dF/dX at X0, Y0 (partial derivative) and B0 = dF/dY at X0, Y0 and C0 = Z0 – A0X0 – B0Y0

    Using the linear relationship Z = A0X + B0Y + C0, solve the problem with standard LP. The solution will provide Z1(old), X1, Y1 based on this relationship. Disregard Z1(old) and find a Z1(new) = F (X1,Y1) and also A1, B1, C1 using above. Also, calculate the error (Z1(old)-Z1(new))^2

    Repeat this process till the error converges to an acceptable value. If the problem diverges (ie error increases or is erratic) the relationships are not convex (or maybe too convex) and the problem cannot be solved using this iterative LP approach.

    Has worked always for me in the area I am involved in.

  3. Hello Admin,
    How many variables can my model contain. I am looking at an assignment problem that could have a couple of million variables.
    Can I still use Open Solver? If not what is the recommendation?
    Thank you

      1. I have just downloaded opensolver on a new computer with excel 2013. If I run the xlam file that came with opensolver, the opensolver add-in is available to use on my spreadsheets. If I close excel and then open it again (without running the xlam file), opensolver is not available in excel. Is there a way I can make opensolver permanently available in excel every time I open excel? Please email me the response, thanks.

        1. 0. Its covered in the ReadMe in the download ZIP that i pulled today.
          1. First go to File > Options > Add-ins and note where you current plugins are found.
          2. Copy the OpenSolver folder in the download to the add-ons folder.
          3. Now, still in the Add-ins screen look at the bottom where it says “Manage” and make sure Excel Plug Ins is selected. Then click on Go.
          4. You can Browse to the location of your OpenSolver folder and click on select folder.
          5. Click on the checkbox next to OpenSolver when it appears in Add-Ins dialog and then click OK.

      2. Thank you very much Andrew.
        I am not familiar with SolverStudio but if that one can handle 2 Million variables why not use that in the first place?
        I mean which is better SolverStudio or OpenSolver ? Thank you

      3. Thank you very much Andrew.
        I am not familiar with SolverStudio but if that one can handle 2 Million variables why not use that in the first place?
        I mean which is better SolverStudio or OpenSolver ? Thank you

  4. Hi Andrew

    Thanks for the reply and giving the opportunity to share what I have. I have nothing written so far but will have a document ready early in the new year. I will let you know when it’s ready.

  5. Hi Andrew

    Thanks again, look forward to getting this new version which blocks updating of dependent data on other sheets during the optimization.

    I have been consistently using OpenSolver for the last two years and thought it would be prudent to let you know of the type of applications I use it for (for whatever it’s worth)

    I work for Snowyhydro Ltd who is the owner/operator of the largest hydro power complex in Australia (the Snowy Mountains Scheme). One of my responsibilities to develop optimization tools for the dispatch of our hydro generators in the National Electricity Market. As you know, hydro scheduling is essentially a complex non-linear optimization problem, with turbine efficiency, electrical loss, reservoir data etc, all being represented by non-linear functions.

    With the help of OpenSolver, I have been able to develop an approach to solve large scale non-linear models using an iterative technique. The only requirement is that the non-linear functions be convex (ie the second derivative is always positive or negative in the range you are looking at)

    If it’s of any value, I can send details of this approach, particularly for the benefit of other users of OpenSolver.

    (I also extensively use the Excel non-linear solver which is great for problems with only a few decision variables)

    1. Thanks for letting us know what you’re doing with OpenSolver. Yes, we’d love to know more… either via a post, or if you have anything written up then I’d welcome the chance to put it up on the OpenSolver site. Cheers, Andrew

    2. Thanks for sharing your results about being able to solve nonlinear convex functions iteratively. Can you please share your procedure and results. In a test application, I was seeing that this was not happening as the results seem to get reinitialized.

      Thanks, Raj

  6. Hi Andrew

    Thanks for the reply. My workbook is quite small (only 85 kB at this stage of the development)so I don’t think its the size that’s giving the problem. However, there is a graph of 48 time-series values being updated with the optimisation. What I found today is that if I remove this graph, the problem goes away. Maybe its the recalculation time of the graph that’s causing it?

    Anyway, I have now disabled the linearity check in the OpenSolver options and the problem doesn’t come even with the graph. All’s well that ends well.

    1. I’m pleased you fixed it. However it is a puzzle as the linearity check is not very different to the other calculations done by OpenSolver. By the way, I am trialling a new version of OpenSolver that allows you to prevent Excel updating dependent data such as charts (assuming they are on other sheets); this can give big time savings in some cases. Cheers, Andrew

  7. Hi Andrew

    Sorry I posted the comment by accident before it was finished.

    Opensolver has been great and is helping me a lot at work. However, I get this error message in my latest model. The message is intermittent – ie sometimes comes and sometimes doesn’t – I am pretty sure the problem is linear as it is solved sometimes.

    OpenSolver: Calculation Error Occured

    Warning: The worksheet calculation did not complete during the linearity test, and so the test may not be correct. Would you like to retry?

    However much I click on retry, the message comes back. Can you help?

    1. This is something we don’t really understand, but sometimes Excel reports the spreadsheet as not having finished re-calculating. We have seen it happen on very large spreadsheets. Is yours a very large workbook? If so, I suggest you make the workbook smaller (eg by deleting any sheets that depend on the decision cells), or switch to SolverStudio. Note that if this happens in the linearity check, it will also happen in the actual model calculations that come next. Sorry I cannot be of more help. Andrew

  8. What would be the easiest way to set up OpenSolver to run in multiple Excel sheets at once? I have a Spreadsheet which contains multiple sheets, each using OpenSolver to optimize data within that particular sheet. The data within each sheet is pulled from another sheet, then each sheet is set up to run a specific optimization of the data. Currently I have to click on each sheet and run OpenSolver one at a time after I’ve updated the data sheet. Is there a way to set it up such that with a single click it will run the optimizations in each sheet at once? I tried setting up a Macro to do it, but I’m not very experienced with Macros or VBA, so that didn’t work out too well.

    Any help or suggested references for this would be much appreciated.

    Thanks,

    Hawk

    1. OpenSolver does not work with maro recoding. I suggest you bite the bullet and learn VBA. (To make this easier, you could record a macro using Solver, and then modify it to work with OpenSolver.) Good luck, Andrew

  9. Hi

    I keep getting the error below. I downloaded a new cbc.exe file.

    “OpenSolver encountered an error:
    The objective cell doesn’t appear to contain a numeric value. Please fix this, and try again. (at line 7610) (at line 19530)
    Source = OpenSolver Model Build, ErrNumber=-2147220504”

    In DOS I see that it is “Unable to to open file C:\…..\model/1p. Ratio gap was changed from 0 to 0.1”

    What does the error mean? How can I fix this?

    1. Thanks for also sending me your spreadsheet. This occurs because setting all your decision cells to zero gives an error in the objective function because your objective is non-linear. OpenSolver does not solve non-linear models, sorry. Andrew

  10. Love that you created this product! I am faculty, and I ask my students to use it to solve problems in Excel, linear and integer.

    I would like to see more information about the iterations performed during Branch and Bound. I set the slogLevel and logLevel to be 2 using values in a Named Range. I think the iterations are running in the command line, but they disappear quickly (I am running small problems in class). Is there a way to see that output in a file, or keep the display box open after the model runs so that I can examine the solutions afterwards? Thanks!

    1. You can solve it once, and then open the problem again in CBC (using the OpenSolver menu). You will have to look up the CBC commands to then solve it with full output being displayed… from memory you can type help to get these. Cheers, Andrew

      1. Thanks for your reply. Here are some notes in case they are useful for others.
        From the CBC window, type “?” to see what commands are possible.
        Since the model is preloaded, Type: ‘stat’ to get a summary of your problem details, ‘solve’ to solve the problem. Already, it lists more information than what one could easily see before.
        Thanks! Julie

  11. Folks,
    I too am enjoying this amazing tool, using the latest version. My PC has Windows 8 and I use Defender anti-virus, but have just started using an additional scanning tool “Malwarebytes”. Unfortunately that scan finds a supposed Trojan threat in the “cbc.exe” file zipped with your product. Could you please advise me?
    Regards,
    Peter Ward

  12. Hi,

    I have encountered the following error while using OpenSolver and have no idea what to do about it

    “The model cannot be solved as it has not yet been built,(at line 10210)(at line 19540)
    Source = OpenSolver Model Solving, ErrNumber =-2147220503”

    Objective cells, Variables cells, Constraints have all be included and the model was saved before I clicked the solve button. Please advise what should I do to tackle the problem, thx

  13. Hello, is it possible to use Open-Solver in a heuristic way by setting a certain runtime and cancle Branch&Bound? How can I get the until then best found solution?

  14. Dear reader,

    First of all: thank you for OpenSolver! I’ve used it extensively these last weeks. I have one question:
    Is it possible to select multiple variable fields? At the moment, I have one large block with variables and one small block. My current approach is to append them, creating one extra large block of variables and a bunch of unused but defined variables as the block sizes differ. For readibility however, I would prefer to have them on different worksheets.
    In the built-in Excel solver this can be done by comma separation. Is such an option also available in OpenSolver?

    Kind regards,
    Marjan

    1. Yes, you can have multiple ranges for your decision variables. Select the with Ctrl held down, or type them in with commas between. Cheers, Andrew

      1. Thanks for the response! The approach you name works for variables on the same sheet. However, with multiple sheets Ctrl will disable me to select another sheet. If I type them with ; in between, I get the error when saving the model: “the cell address for the decision variables is invalid. Please correct this and try again.” Same error with a , in between.
        So now my approach is to append the two worksheets to one, and I can select both blocks using the CTRL or ;.

        1. The Excel control for entering ranges does not allow a range to include areas on multiple sheets, so you need to keep all the decision variable cells on the single sheet, as you have done. Cheers, Andrew

      2. “Yes, you can have multiple ranges for your decision variables. Select the with Ctrl held down, or type them in with commas between. Cheers, Andrew”

        I have a lot of multiple ranges as decision variables. But after typing 7 or 8 ranges or selecting them with Ctrl it appears: “the cell address for the decision variables is invalid. Please correct this and try again”. Is there a limit or something?

        You can see my decision variables below. It would be very nice if you could give me a hint or just the info that it doesn’t work with so many decision variables.

        Thanks for your help in advance!

        $B$243:$B$249;$B$252:$B$255;$B$258;$C$211:$C$212;$C$291:$C$293;$C$296:$C$298;$D$214:$D$219;$E$210;$E$232:$E$235;$E$240:$E$242;$F$223:$F$224;$F$229:$F$231;$F$233;$F$251;$G$206:$G$207;$G$209;$G$211:$G$213;$H$233:$H$234;$H$237;$H$240:$H$241;$I$206;$I$208;$I$218;$J$235:$J$236;$J$243:$J$250;$J$252:$J$253;$J$259:$J$261;$J$255;$K$206:$K$209;$K$212:$K$213;$L$243:$L$250;$L$252:$L$255;$L$260:$L$261;$M$286;$M$291:$M$294;$M$296:$M$298;$N$243:$N$250;$N$252:$N$255;$N$260:$N$261;O$227:$O$228;$P$238:$P$239;$P$257:$P$259;$P$262:$P$266;$P$268:$P$270;$P$277;$P$298;$Q$276:$Q$280;$R$237:$R$240;$R$262:$R$264;$R$298;$S$237:$S$239;$S$253;$S$257:$S$260;$S$262:$S$266;$S$269;$T$220:$T$221;$U$222:$U$228;$U$230:$U$232;$V$230:$V$236;$V$240:$V$242;$V$224;$W$211:$W$213;$W$291;$W$293;$W$296:$W$297;$X$281:$X$283;$X$285:$X$287;$X$291:$X$292;$X$294;$Z$209:$X$213;$Z$299:$X$300;$Y$223:$Y$225;$Y$227:$Y$228;$AA$256:$AA$258;$AA$262:$AA$263;$AA$265:$AA$270;$AA$277;$AB$257;$AB$262:$AB$263;$AB$265;$AB$268:$AB$278;$AC$235:$AC$237;$AC$239:$AC$240;$AC$261;$AD$287:$AD$290;$AD$283;$AE$223:$AE$228;$AF$243:$AF$244;$AF$252:$AF$259;$AF$262:$AF$263;$AF$266;$AG$243:$AG$249;$AG$252:$AG$255;$AG$258:$AG$261;$AH$279;$AH$289;$AI$206;$AI$209:$AI$211;$AI$242;$AJ$222:$AJ$226;$AK$209:$AK$210;$AK$217;$AK$233;$AK$241:$AK$242;$AL$257;$AL$262:$AL$272;$AL$275:$AL$277;$AM$281:$AM$288;$AM$290;$AN$235:$AN$236;$AN$243;$AN$245:$AN$251;$AN$260:$AN$261;$AO$220:$AO$221;$AP$210;$AP$240;$AP$300;$AQ$224;$AQ$229:$AQ$231;$AQ$251;$AR$229;$AR$231;$AR$233:$AR$236;$AR$246:$AR$248;$AR$250:$AR$251;$AR$260:$AR$261;$AS$233:$AS$237;$AS$240;$AS$245:$AS$247;$AS$260:$AS$261;$AT$285;$AT$294:$AT$295;$AU$214:$AU$219;$AU$242;$AV$281:$AV$282;$AV$285:$AV$286;$AV$291:$AV$295;$AW$281:$AW$287;$AX$220:$AX$222;$AX$226;$AY$256:$AY$257;$AY$267:$AY$269;$AZ$219:$AZ$220;$BA$238;$BA$243;$BA$245:$BA$247;$BA$252:$BA$253;$BA$255;$BA$259:$BA$264;$BB$269;$BB$271:$BB$277;$BB$279;$BB$290;$BC$256;$BC$258;$BC$267;$BD$271:$BD$277;$BD$279;$BD$290;$BE$271:$BE$274;$BE$276;$BE$281;$BE$287:$BE$290;$BF$223:$BF$225;$BF$232;$BG$209:$BG$210;$BG$214;$BG$216:$BG$217;$BH$214:$BH$217;$BH$219;$BH$222;$BI$239;$BI$262:$BI$264;$BI$272;$BI$275;$BI$291:$BI$292;$BI$297:$BI$299;$B$204:$BI$204

        1. Can I suggest that having a list of decision cells that is so long (over 2000 characters!) is not the best way to design a model. Rearrange your decision cells into a compact block so you do not hit Excel’s limits on the maximum number of characters in a range. Cheers, Andrew

          1. Wow fast answer thanks!

            I already thought about that but changing the position of a cells will destroy the needed sequence.

            One another question: Can I select one big range and then define the empty cells with “something”, so the OpenSolver will ignore those empty cells?

            Thanks again Andrew, very nice tool!

            1. Or maybe I just set each empty cell as a restriction. So every empty cell has to be zero! I will try it;)

            2. Yes, but you will get 0’s in the blank cells. A possibly better way is to create a new block of decision cells, and then, in each of your current decision cells, put a formula that gets a value from the new decision cells. Cheers, Andrew

  15. Hi,
    A very quick question. what is the commend in VBA to start the open solver.
    Example, starting the regular solver is just SolverSolve.

    Thank you.

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