LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Calling the Solver via a subroutine

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call a subroutine using variable subroutine name dhstein Excel Discussion (Misc queries) 3 July 26th 09 08:28 PM
Stopping a userform subroutine teepee[_3_] Excel Discussion (Misc queries) 5 January 13th 09 01:10 AM
SUBROUTINE HELP biker man Excel Discussion (Misc queries) 1 July 28th 07 04:06 PM
How to use this subroutine on multiple cells? Big Ian Excel Worksheet Functions 4 February 14th 06 02:01 PM
How do I exit a macro subroutine? John Excel Worksheet Functions 1 January 15th 06 02:08 AM


All times are GMT +1. The time now is 06:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"