Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2000 Solver Problems
Just wondering if anyone has had the same problem, and if it is fixable: I am using excel 2000 with SP 3 and the solver doesn't seem to work - both with programming it and using it in the worksheet. I found a related kb article (821430) saying that it needed a hotfix, but there are no hotfixes to be found anywhere. Is it just my computer, or can it be fixed? Please point me in the direction to go if it can be fixed. Thanks -- speyry ------------------------------------------------------------------------ speyry's Profile: http://www.excelforum.com/member.php...o&userid=25128 View this thread: http://www.excelforum.com/showthread...hreadid=386541 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2000 Solver Problems
I can run solver fine in the spreadsheet manually (Excel 2000 SP-3), bu I am having the same issue with regards to VBA. Below is the code wrote: Dim I As Integer Dim DesiredVal As Range Set DesiredVal = Range("OutputOCext") Dim TargetCell As Range For I = 1 To 228 Set TargetCell = DesiredVal.Cells(1, 1).Offset(I - 1, 3) If DesiredVal.Cells(I) 0 Then SolverReset SolverOk SetCell:=TargetCell.Address, MaxMinVal:=3 ValueOf:=TargetCell.Offset(0, -3).Value, ByChange:=TargetCell.Offset(0 -1).Address SolverReset SolverOk SetCell:=TargetCell.Address, MaxMinVal:=3 ValueOf:=TargetCell.Offset(0, -3).Value, ByChange:=TargetCell.Offset(0 -1).Address SolverSolve UserFinish:=True SolverFinish keepFinal:=1 If TargetCell.Offset(0, -1).Value < 0 Then TargetCell.Offset(0, -1).Value = 0 SolverReset SolverOk SetCell:=TargetCell.Address, MaxMinVal:=3 ValueOf:=TargetCell.Offset(0, -3).Value, ByChange:=TargetCell.Offset(0 -2).Address SolverReset SolverOk SetCell:=TargetCell.Address, MaxMinVal:=3 ValueOf:=TargetCell.Offset(0, -3).Value, ByChange:=TargetCell.Offset(0 -2).Address SolverSolve UserFinish:=True SolverFinish keepFinal:=1 End If Else TargetCell.Offset(0, -1).Value = 0 TargetCell.Offset(0, -2).Value = 0 End If Next I This works perfectly in Excel 2003 and in Excel 2000 (basic install but with Excel 2000 SP-3 it does not. One thing I noticed is that i the with Excel 2000 SP-3 if you open up solver after the macro runs the "SetCell" and "ByChangingCell" boxes are not populated while the are in the other versions of Excel for the last solution solve performed. Apparently these references are not making it into thes boxes with SP-3. Also am using windows XP SP-2. Does anybody know of a fix? thanks, Lauri -- Lauri ----------------------------------------------------------------------- Laurin's Profile: http://www.excelforum.com/member.php...fo&userid=2683 View this thread: http://www.excelforum.com/showthread.php?threadid=38654 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using the solver in excel 2000 | Excel Discussion (Misc queries) | |||
Where can I download the "solver" add-in for Excel 2000? | Excel Discussion (Misc queries) | |||
Problems running Solver from VB: Windows 2000 users? | Excel Programming | |||
Code-signing certificate problems in Excel 2000 with Windows 2000 | Excel Programming | |||
Solver error with Excel 2000? | Excel Programming |