Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Solver - won't run Macro in Step Thru - help
Hi all,
I am having a terrible time getting Solver in Excel 2000 to run a Macro at each iteration. My ultimate goal is to have solver change values for a cell (or range of cells) and call a Macro named "Unit_values_load" at each iteration, look for a result value after Macro has run called "TotalExpValue" and when TotalExpValue cannot be increased by changing cells, finish with the results being the "Optimized" values for the cell (range of cells) that could be changed. Attached is the code : Sub OptzBak() SolverReset SolverOptions Precision:=0.001, StepThru:=True, AssumeNonNeg:=True SolverOk SetCell:=Range("TotalExpValue"), _ MaxMinVal:=1, _ ByChange:=("E103") SolverAdd CellRef:=Sheets("Discount_value").Range("e103"), _ Relation:=1, _ FormulaText:=100 SolverSolve userFinish:=False, showRef:=("Unit_values_load") SolverSave saveArea:=("Results!A1:A3") End Sub Note: I have Solver checked in references already, still didn't help. Thanks for your help in advance.. -joe |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating a Drop Down List with Step by Step Instructions for 2007 | Excel Worksheet Functions | |||
Macro Step by Step | Excel Discussion (Misc queries) | |||
What is the step-by-step procedure for making a data list? | Excel Discussion (Misc queries) | |||
I need step by step instructions to create a macro for 10 imbedde. | Excel Worksheet Functions | |||
VBA macro step-by-step | Excel Programming |