Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am currently using code of the form below to run solver multiple times.
The problem that I am having is that the 'SolverOK' function does not modify the solver form. Running the code causes no change in the desired cells. Several permutations of the code have caused the referenced cells' values to be replaced by the string of the cells' addresses. This is running on MSVB6.0 with Excel 2000 9.06926 SP-3) on Windows 2000 5.00.2195, SP-3. After this code runs, the 'Set Target cell' and 'By Changing Cells' fields are blank. Call SOLVER.SolverReset Call SOLVER.SolverOK("$A$4", 3, 0#, "$B$6") Call SOLVER.SolverAdd("$C$36", 2, "$C$38") Call SOLVER.SolverSolve(True) Call SOLVER.SolverSave("$C$45") Any help, relating, or sympathy would be greatly appreciated... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
XydQyv -
Chris Albright discusses a similar problem in his book "VBA for Modelers: Developing Decision Support Systems with Microsoft Excel." His solution is to repeat the first two lines of code, so the first four lines would be Reset, OK, Reset, OK. - Mike www.mikemiddleton.com "XydQyv" wrote in message ... I am currently using code of the form below to run solver multiple times. The problem that I am having is that the 'SolverOK' function does not modify the solver form. Running the code causes no change in the desired cells. Several permutations of the code have caused the referenced cells' values to be replaced by the string of the cells' addresses. This is running on MSVB6.0 with Excel 2000 9.06926 SP-3) on Windows 2000 5.00.2195, SP-3. After this code runs, the 'Set Target cell' and 'By Changing Cells' fields are blank. Call SOLVER.SolverReset Call SOLVER.SolverOK("$A$4", 3, 0#, "$B$6") Call SOLVER.SolverAdd("$C$36", 2, "$C$38") Call SOLVER.SolverSolve(True) Call SOLVER.SolverSave("$C$45") Any help, relating, or sympathy would be greatly appreciated... |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just out of curiosity, what does your MsgBox returned. Is it False?
Sub Demo() '// See if it's False MsgBox SOLVER.AutoOpened '// Then try... SOLVER.Auto_open '// Your code here... End Sub -- Dana DeLouis Win XP & Office 2003 "XydQyv" wrote in message ... I am currently using code of the form below to run solver multiple times. The problem that I am having is that the 'SolverOK' function does not modify the solver form. Running the code causes no change in the desired cells. Several permutations of the code have caused the referenced cells' values to be replaced by the string of the cells' addresses. This is running on MSVB6.0 with Excel 2000 9.06926 SP-3) on Windows 2000 5.00.2195, SP-3. After this code runs, the 'Set Target cell' and 'By Changing Cells' fields are blank. Call SOLVER.SolverReset Call SOLVER.SolverOK("$A$4", 3, 0#, "$B$6") Call SOLVER.SolverAdd("$C$36", 2, "$C$38") Call SOLVER.SolverSolve(True) Call SOLVER.SolverSave("$C$45") Any help, relating, or sympathy would be greatly appreciated... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA SolverOK not inputting all values into Solver... | Excel Programming | |||
solver.xla fails | Excel Programming | |||
SolverOK, he not so OK | Excel Programming | |||
SolverOK problem - very frustrated, please help | Excel Programming | |||
Solver Fails in Excel XP | Excel Programming |