Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default SolverSolve return values

I have a macro where I use the Solver multiple times. I would like to
capture the value that SolverSolve returns (I understand that there are 1 of
13 values returned by the SolverSolve command) in order to determine how my
macro should respond. Does any know how to capture the returned value? I
currently use the following:

If SolverSolve(UserFinish:=True) = 4 Then.....

This works but if I use this approcah for each condition the SolverSolve
command appears to run for each statement. I would like to capture this
returned value to evaluate without re-running the solver for each test.

Thanks for you help.
Steve
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default SolverSolve return values

Dim iSolverSolve As Long
iSolverSolve = SolverSolve(UserFinish:=True)
Select Case iSolverSolve
etc.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Steve M" wrote in message
...
I have a macro where I use the Solver multiple times. I would like to
capture the value that SolverSolve returns (I understand that there are 1
of
13 values returned by the SolverSolve command) in order to determine how
my
macro should respond. Does any know how to capture the returned value? I
currently use the following:

If SolverSolve(UserFinish:=True) = 4 Then.....

This works but if I use this approcah for each condition the SolverSolve
command appears to run for each statement. I would like to capture this
returned value to evaluate without re-running the solver for each test.

Thanks for you help.
Steve



Reply
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
Exclude #N/A values and Return Numeric values to consecutive cells in Single Row Sam via OfficeKB.com Excel Worksheet Functions 5 February 9th 08 03:07 AM
SOLVER solversolve showref woof Excel Programming 3 June 26th 06 05:04 PM
Solver: 2nd function of SolverSolve zaina Excel Programming 3 June 18th 05 08:00 AM
How does Solversolve Control Macro Dacvid Cardner Excel Programming 1 June 17th 04 07:41 PM
VBA Syntax for VLOOKUP to return array of return values Alan Beban[_3_] Excel Programming 7 August 5th 03 11:41 AM


All times are GMT +1. The time now is 09:08 AM.

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"