Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello: I am trying to use the SOlverOK module ina loop ina macro and I am no able to reset the cosntraint set. Code I am using is below. PLEAS HELP!! thanks msuryexcel **** For j = 2 To numdates - k1 rj = rk + j ri = rj - 500 riold = ri - 1 Range(col3 & rj).Select SolverOk SetCell:=col3 & rj, MaxMinVal:=2, ValueOf:="0" ByChange:= _ "$E$" & ri & ":$AA$" & ri SolverDelete CellRef:="$AC$" & riold, Relation:=2 FormulaText:="1" SolverAdd CellRef:="$AC$" & ri, Relation:=2, FormulaText:="1" SolverOk SetCell:=col3 & rj, MaxMinVal:=2, ValueOf:="0" ByChange:= _ "$E$" & ri & ":$AA$" & ri SolverDelete CellRef:="$E$" & riold & ":$AA$" & riold Relation:=3, FormulaText:="0" SolverAdd CellRef:="$E$" & ri & ":$AA$" & ri, Relation:=3 FormulaText:="0""" SolverOk SetCell:=col3 & rj, MaxMinVal:=2, ValueOf:="0" ByChange:= _ "$E$" & ri & ":$AA$" & ri SolverSolve Next j *** -- msuryexce ----------------------------------------------------------------------- msuryexcel's Profile: http://www.excelforum.com/member.php...fo&userid=2816 View this thread: http://www.excelforum.com/showthread.php?threadid=47684 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Interesting Solver problem (Solver encounters an error) | Excel Discussion (Misc queries) | |||
Advancing outer Loop Based on criteria of inner loop | Excel Programming | |||
Problem adding charts using Do-Loop Until loop | Excel Programming | |||
Error message when using the Solver in a VBA macro loop | Excel Programming | |||
Resetting Solver Manually to Fix Solver Bug | Excel Programming |