View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dana DeLouis[_3_] Dana DeLouis[_3_] is offline
external usenet poster
 
Posts: 690
Default Solver VB interface 'SolverOK' fails

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...