Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Solver VBA - Defining Solver Options

I'm using the basic version of solver that comes with excel. I've been
defining the constraints, variables etc using VBA macros as shown in article
843304. I now need to define the max time, number of iterations, precision
etc - basically the options that you can define from the actual Solver
Parameters window. Does anyone know how you can define these options within
VBA code? It isn't discussed in the aforementioned article. Is there
perhaps another article that discusses this material?

Thanks in advance!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Solver VBA - Defining Solver Options

I have a bunch of links at the bottom of this page which might help:

http://peltiertech.com/Excel/SolverVBA.html

Did you try recording a macro while you adjusted these parameters?

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


"Kyle" wrote in message
...
I'm using the basic version of solver that comes with excel. I've been
defining the constraints, variables etc using VBA macros as shown in
article
843304. I now need to define the max time, number of iterations,
precision
etc - basically the options that you can define from the actual Solver
Parameters window. Does anyone know how you can define these options
within
VBA code? It isn't discussed in the aforementioned article. Is there
perhaps another article that discusses this material?

Thanks in advance!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Solver VBA - Defining Solver Options

Where can I find Article 843304?

Thanks!


"Kyle" wrote in message
...
I'm using the basic version of solver that comes with excel. I've been
defining the constraints, variables etc using VBA macros as shown in
article
843304. I now need to define the max time, number of iterations,
precision
etc - basically the options that you can define from the actual Solver
Parameters window. Does anyone know how you can define these options
within
VBA code? It isn't discussed in the aforementioned article. Is there
perhaps another article that discusses this material?

Thanks in advance!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 947
Default Solver VBA - Defining Solver Options

Where can I find Article 843304?

Microsoft Help gets worse by the year...
Here's a simple macro I use...

Sub KB_Artilce_Number()
Const Kb As String = "http://support.microsoft.com/kb/#/en-us"
Dim strAdr As String

strAdr = InputBox("Enter KB article Number")
strAdr = Replace(Kb, "#", strAdr)

ActiveWorkbook.FollowHyperlink Address:=strAdr, NewWindow:=True
End Sub

--
HTH :)
Dana DeLouis


"Steve" wrote in message
...
Where can I find Article 843304?

Thanks!


"Kyle" wrote in message
...
I'm using the basic version of solver that comes with excel. I've been
defining the constraints, variables etc using VBA macros as shown in
article
843304. I now need to define the max time, number of iterations,
precision
etc - basically the options that you can define from the actual Solver
Parameters window. Does anyone know how you can define these options
within
VBA code? It isn't discussed in the aforementioned article. Is there
perhaps another article that discusses this material?

Thanks in advance!





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Solver VBA - Defining Solver Options

I'm not sure if this is the same link that Dana gave but here's the article:

http://support.microsoft.com/kb/843304

Alternatively, if this link doesn't work search for: How to create Visual
Basic macros by using Excel Solver in Excel 97 in a google search, its the
first link.

"Steve" wrote:

Where can I find Article 843304?

Thanks!


"Kyle" wrote in message
...
I'm using the basic version of solver that comes with excel. I've been
defining the constraints, variables etc using VBA macros as shown in
article
843304. I now need to define the max time, number of iterations,
precision
etc - basically the options that you can define from the actual Solver
Parameters window. Does anyone know how you can define these options
within
VBA code? It isn't discussed in the aforementioned article. Is there
perhaps another article that discusses this material?

Thanks in advance!






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Solver VBA - Defining Solver Options

Thanks for your help Jon, I accidentaly found a way of setting the options
when I tried to save a model within the worksheet and then record the upload
of that scenario using a macro. Here's the vba code template for anyone
interested:

SolverOptions MaxTime:=32767, Iterations:=32767, Precision:=0.00001, _
AssumeLinear:=False, StepThru:=False, Estimates:=1, Derivatives:=1, _
SearchOption:=1, IntTolerance:=5, Scaling:=False,
Convergence:=0.0001, _
AssumeNonNeg:=False

Its fairly clear what the code refers to within the solve options window.
The only options I've changed from the default are setting the max time and
iterations to max and perhaps altering the precision.

"Jon Peltier" wrote:

I have a bunch of links at the bottom of this page which might help:

http://peltiertech.com/Excel/SolverVBA.html

Did you try recording a macro while you adjusted these parameters?

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


"Kyle" wrote in message
...
I'm using the basic version of solver that comes with excel. I've been
defining the constraints, variables etc using VBA macros as shown in
article
843304. I now need to define the max time, number of iterations,
precision
etc - basically the options that you can define from the actual Solver
Parameters window. Does anyone know how you can define these options
within
VBA code? It isn't discussed in the aforementioned article. Is there
perhaps another article that discusses this material?

Thanks in advance!




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
referencing Solver.xlam vs. Solver.xla - 2007 vs. 2003 Duke Carey Excel Programming 3 November 20th 07 03:48 PM
Interesting Solver problem (Solver encounters an error) MrShorty Excel Discussion (Misc queries) 3 December 22nd 05 10:52 PM
solver and defining all variables different than one another excel_excel_excel Excel Discussion (Misc queries) 0 July 19th 05 07:38 AM
How do I start solver options in a Macro? Kent Gambrel Excel Programming 2 February 14th 05 06:44 PM
Resetting Solver Manually to Fix Solver Bug Stratuser Excel Programming 0 September 13th 04 07:04 PM


All times are GMT +1. The time now is 03:51 PM.

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

About Us

"It's about Microsoft Excel"