Home 
Search 
Today's Posts 
#21




Problem loading Solver
"programmernovice" wrote in message Thanks Peter & Garry. I tried following all instructions, even removing and readding Excel in Programs & Features (Windows 10) Now can't run the following script: solverok setcell:=Range("Collect.xlsm!absDif"), maxminval:=2, valueof:="0", bychange:=Range("Collect.xlsm!absDif").Offset(0, 1) solverSolve (True) solverfinish (True) I get: Compile error: Can't find project or library Any ideas? Thanks for your patience, fellows! I failed to mention that the script shown was obtained by recording the procedure under the Record macro option of Excel 2007. As Claus said you need to add a reference to the solver addin, though in an English system if would be in Tools / References, not "Extras" If solver.xlam is already loaded tick "SOLVER" which you should see near the top of the list. But just for this it doesn't need to be loaded or installed as an addin, just browse to the file in References. In future it should load automatically with your file if not already loaded. Peter T 
#22




Problem loading Solver
On Monday, December 16, 2019 at 2:34:27 PM UTC6, Peter T wrote:
"programmernovice" wrote in message Thanks Peter & Garry. I tried following all instructions, even removing and readding Excel in Programs & Features (Windows 10) Now can't run the following script: solverok setcell:=Range("Collect.xlsm!absDif"), maxminval:=2, valueof:="0", bychange:=Range("Collect.xlsm!absDif").Offset(0, 1) solverSolve (True) solverfinish (True) I get: Compile error: Can't find project or library Any ideas? Thanks for your patience, fellows! I failed to mention that the script shown was obtained by recording the procedure under the Record macro option of Excel 2007. As Claus said you need to add a reference to the solver addin, though in an English system if would be in Tools / References, not "Extras" If solver.xlam is already loaded tick "SOLVER" which you should see near the top of the list. But just for this it doesn't need to be loaded or installed as an addin, just browse to the file in References. In future it should load automatically with your file if not already loaded. Peter T Many thanks to Peter, Garry, and now Claus. I resolved all my problems. One last question (I hope). The final popup from Solver (Solver Results) requires user to click on the OK button to close it. Is there some way via VBA to do this and completely automate the process. You guys are incredible resources for a tyro like myself. Thanks for helping me out. 
#23




Problem loading Solver
"programmernovice" wrote in message
The final popup from Solver (Solver Results) requires user to click on the OK button to close it. Is there some way via VBA to do this and completely automate the process. =============================== It's a while since I've used it, I vaguely recall there is a way though it seems to have a mind of it's own whether the final dialog appears, or maybe it's the overall scenario. See if you can find something in the following: https://www.solver.com/excelsolvervbafunctions https://peltiertech.com/Excel/SolverVBA.html Peter T 
#24




Problem loading Solver
On Tuesday, December 17, 2019 at 8:00:38 AM UTC6, Peter T wrote:
"programmernovice" wrote in message The final popup from Solver (Solver Results) requires user to click on the OK button to close it. Is there some way via VBA to do this and completely automate the process. =============================== It's a while since I've used it, I vaguely recall there is a way though it seems to have a mind of it's own whether the final dialog appears, or maybe it's the overall scenario. See if you can find something in the following: https://www.solver.com/excelsolvervbafunctions https://peltiertech.com/Excel/SolverVBA.html Peter T Thanks Peter. In case it's helpful to you: SolverSolve True works. Regards 
#25




Problem loading Solver
"programmernovice" wrote in message
On Tuesday, December 17, 2019 at 8:00:38 AM UTC6, Peter T wrote: "programmernovice" wrote in message The final popup from Solver (Solver Results) requires user to click on the OK button to close it. Is there some way via VBA to do this and completely automate the process. =============================== It's a while since I've used it, I vaguely recall there is a way though it seems to have a mind of it's own whether the final dialog appears, or maybe it's the overall scenario. See if you can find something in the following: https://www.solver.com/excelsolvervbafunctions https://peltiertech.com/Excel/SolverVBA.html Peter T Thanks Peter. In case it's helpful to you: SolverSolve True works. Regards Indeed that's what the documentation says, but don't be surprised if the dialog appears again! Peter T 
#26




Problem loading Solver
"Peter T" wrote in message ... "programmernovice" wrote in message On Tuesday, December 17, 2019 at 8:00:38 AM UTC6, Peter T wrote: "programmernovice" wrote in message The final popup from Solver (Solver Results) requires user to click on the OK button to close it. Is there some way via VBA to do this and completely automate the process. =============================== It's a while since I've used it, I vaguely recall there is a way though it seems to have a mind of it's own whether the final dialog appears, or maybe it's the overall scenario. See if you can find something in the following: https://www.solver.com/excelsolvervbafunctions https://peltiertech.com/Excel/SolverVBA.html Peter T Thanks Peter. In case it's helpful to you: SolverSolve True works. Regards Indeed that's what the documentation says, but don't be surprised if the dialog appears again! Peter T ... and looking back at your post with your code you already had exactly that...? PT 
#27




Problem loading Solver
On Tuesday, December 17, 2019 at 10:14:56 AM UTC6, Peter T wrote:
"Peter T" wrote in message ... "programmernovice" wrote in message On Tuesday, December 17, 2019 at 8:00:38 AM UTC6, Peter T wrote: "programmernovice" wrote in message The final popup from Solver (Solver Results) requires user to click on the OK button to close it. Is there some way via VBA to do this and completely automate the process. =============================== It's a while since I've used it, I vaguely recall there is a way though it seems to have a mind of it's own whether the final dialog appears, or maybe it's the overall scenario. See if you can find something in the following: https://www.solver.com/excelsolvervbafunctions https://peltiertech.com/Excel/SolverVBA.html Peter T Thanks Peter. In case it's helpful to you: SolverSolve True works. Regards Indeed that's what the documentation says, but don't be surprised if the dialog appears again! Peter T .. and looking back at your post with your code you already had exactly that...? PT Well, for now it works. My code had just SolverSolve Addition of "True" appears to have helped. Hopefully it will remain so. Thanks, regards 
#28




Problem loading Solver
"programmernovice" wrote in message
Peter T Thanks Peter. In case it's helpful to you: SolverSolve True works. Regards Indeed that's what the documentation says, but don't be surprised if the dialog appears again! Peter T .. and looking back at your post with your code you already had exactly that...? PT Well, for now it works. My code had just SolverSolve Addition of "True" appears to have helped. Hopefully it will remain so. Thanks, regards Fair enough and my memory may well be wrong on this. FWIW in what you said yesterday was your code (when you said it was giving a compile error) SolverSolve included True: solverSolve (True) Peter T 
#29




Problem loading Solver
On Tuesday, December 17, 2019 at 12:52:13 PM UTC6, Peter T wrote:
"programmernovice" wrote in message Peter T Thanks Peter. In case it's helpful to you: SolverSolve True works. Regards Indeed that's what the documentation says, but don't be surprised if the dialog appears again! Peter T .. and looking back at your post with your code you already had exactly that...? PT Well, for now it works. My code had just SolverSolve Addition of "True" appears to have helped. Hopefully it will remain so. Thanks, regards Fair enough and my memory may well be wrong on this. FWIW in what you said yesterday was your code (when you said it was giving a compile error) SolverSolve included True: solverSolve (True) Peter T I wonder if adding True without parentheses helped? At any rate it appears to work for now. Thanks again for your interest. 
#30




Problem loading Solver
On Tuesday, December 17, 2019 at 12:52:13 PM UTC6, Peter T wrote:
"programmernovice" wrote in message Peter T Thanks Peter. In case it's helpful to you: SolverSolve True works. Regards Indeed that's what the documentation says, but don't be surprised if the dialog appears again! Peter T .. and looking back at your post with your code you already had exactly that...? PT Well, for now it works. My code had just SolverSolve Addition of "True" appears to have helped. Hopefully it will remain so. Thanks, regards Fair enough and my memory may well be wrong on this. FWIW in what you said yesterday was your code (when you said it was giving a compile error) SolverSolve included True: solverSolve (True) Peter T I wonder if adding True without parentheses helped? At any rate it appears to work for now. Thanks again for your interest. Normally, the parenthesis are not needed when the method is not on the right hand side of '=', OR when the enclosed does not include an operator. SolverSolve True 'correct syntax SolverSolve (True) 'incorrect syntax With operator involved: ret = SolverSolve(True) 'correct syntax if SolverSolve returns a value bSuccess = (Err = 0) 'correct syntax using an operator returns True if no error, otherwise returns False  Garry Free usenet access at http://www.eternalseptember.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion 
Reply 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Forum  
Solver model loading problem  Excel Discussion (Misc queries)  
Referencing and loading Solver programatically  how?  Excel Programming  
Interesting Solver problem (Solver encounters an error)  Excel Discussion (Misc queries)  
Addin loading problem  Excel Programming  
File Loading Problem  Excel Programming 