Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to set up a program that will go down a list
in Excel and solve for some particular items in a given row using the Excel Solver. I can do this by "hand". However, the idea is to automate it to save time. I can't seem to be able to call the Solver using VBA code. I am using the following code to call the solver with some constraints: SolverOk SetCell:=Cells(i, Column_GSV),MaxMinVal:=2, ValueOf:="0", ByChange:=Cells(Row_#, Column_CV) SolverAdd CellRef:=Cells(i, Column_CV), Relation:=1, FormulaText:=Max_Airflow SolverAdd CellRef:=Cells(i, Column_CV), Relation:=3, FormulaText:=0 SolverSolve When running, I get the following message: "Sub or Function not defined" Any ideas of what will correctly call the Solver with VBA code, or can I call the Solver using VBA code? I greatly appreciate your help. Thanks James |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Call a subroutine using variable subroutine name | Excel Discussion (Misc queries) | |||
Stopping a userform subroutine | Excel Discussion (Misc queries) | |||
SUBROUTINE HELP | Excel Discussion (Misc queries) | |||
How to use this subroutine on multiple cells? | Excel Worksheet Functions | |||
How do I exit a macro subroutine? | Excel Worksheet Functions |