Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SolverOK problem - very frustrated, please help
ok, i am trying to invoke the solver from my VB code. The code works (solves) every time on MS Excel 2000 SP-1, and does not work on MS Excel 2000 SP-3. I have tried this on many different machines
I need to distribute my code to other Excel users, many of which are using Excel 2000 SP-3, so this is a big problem ON SP3: I press "solve" and nothing happends, no error message. Has anyone else experienced this Solverreset work SolverOptions works (i checked, it actually changed the options in the solver SolverAdd works (it adds the constraints SolverOK does not work (SetCell and ByChange do NOT work, MinMaxVal and ValueOf work SolverSolve does not work (makes sense, since SetCell and and ByChange are left blank in the solver Any ideas Here is the code Private Sub SolveIt( ' SolveIt Macr ' Macro recorded 12/12/2003 by Tim Anderso Application.ScreenUpdating = Fals Count = Range("MatrixL").Coun NumRows = Sqr(Count 'Reset the Solve solvrese SolvOptions MaxTime:=100, Iterations:=100, Precision:=0.000001, AssumeLinear :=False, StepThru:=False, Estimates:=1, Derivatives:=1, SearchOption:=1, IntTolerance:=5, Scaling:=True, Convergence:=0.0001, AssumeNonNeg:=Fals 'Insert new constraint For i = 1 To NumRow SolvAdd CellRef:=Range("MatrixLLT").Cells(i, i), Relation:=2, FormulaText:="1 Next 'Set objective function and decision variables, then solv For j = 1 To SolverOK SetCell:="Objective", MaxMinVal:=2, ValueOf:="0", ByChange:="DecVars SolverSolve UserFinish = Fals Next SolverOK SetCell:="Objective", MaxMinVal:=2, ValueOf:="0", ByChange:="DecVars SolverSolve UserFinish = Tru End Su |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
So frustrated! Please help! | Excel Discussion (Misc queries) | |||
Frustrated | New Users to Excel | |||
Frustrated Professor | Excel Worksheet Functions | |||
Frustrated Cook | Excel Worksheet Functions | |||
SolverOK Problem after SP-3 Update | Excel Programming |