![]() |
Excel solver time limit
I am using VBA script to run the standard excel solver
automatically every minute or so in an excel spreadsheet and it runs reasonably well however occasionally (Once every 12 to 24 hrs) I receive a dialog box indicating "The maximum time limit was reached; continue anyway?". Is there VB code I can use to automatically close this dialogue if it appears box by choosing 'stop' or 'continue' or will a user have to manually intervene? For example I use "SolverSolve UserFinish:=True" and "SolverFinish" in my current code to prevent user intervention. I have tried extending the maximum time in the options and that does not appear to make a large difference. |
Excel solver time limit
David -
The SolverSolve function returns an integer value indicating what happened. I think 0,1,2 indicate various kinds of success, but I don't have the list handy. Maybe you could check the function result like this: If SolverSolve(UserFinish:=True) 2 Then ... Else ... And I don't know if this will avoid the dialog box. - Mike Middleton, www.usfca.edu/~middleton +++++++++++++++++++++++++++++++++ I am using VBA script to run the standard excel solver automatically every minute or so in an excel spreadsheet and it runs reasonably well however occasionally (Once every 12 to 24 hrs) I receive a dialog box indicating "The maximum time limit was reached; continue anyway?". Is there VB code I can use to automatically close this dialogue if it appears box by choosing 'stop' or 'continue' or will a user have to manually intervene? For example I use "SolverSolve UserFinish:=True" and "SolverFinish" in my current code to prevent user intervention. I have tried extending the maximum time in the options and that does not appear to make a large difference. |
All times are GMT +1. The time now is 11:59 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com