Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Solver dialog box

I am trying to use the solver function within a macro and I want the macro to
end not with the "solve" button in the solve dialog box, but with the
solution itself in the worksheet. Is it possible to do that? Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Solver dialog box

Try something like this:

Sub Macro1()
SolverOk SetCell:="$A$2", MaxMinVal:=3, ValueOf:="0", ByChange:="$A$1"
SolverSolve UserFinish:=True
End Sub

This is an easy example of setting A2 to zero by updating A1. The UserFinish
statement avoids the last dialog box that asks if you want to keep the result.


By the way. VBA Help is not very helpful on this topic. Better see:

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

--
Gary''s Student - gsnu200780


"gtoffoli" wrote:

I am trying to use the solver function within a macro and I want the macro to
end not with the "solve" button in the solve dialog box, but with the
solution itself in the worksheet. Is it possible to do that? Thanks!

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
How to record the EXCEL Solver Parameters Dialog Box? pierre Excel Discussion (Misc queries) 1 March 10th 06 11:52 AM
Interesting Solver problem (Solver encounters an error) MrShorty Excel Discussion (Misc queries) 3 December 22nd 05 10:52 PM
How do I turn off the solver results dialog box cripwell01 Excel Worksheet Functions 1 November 9th 05 02:13 PM
How do I respond to a Solver Results Dialog Box from a macro? gmk49 Excel Discussion (Misc queries) 1 September 7th 05 02:22 PM
solver dialog box in VB rd2001 Excel Programming 0 September 18th 03 04:00 PM


All times are GMT +1. The time now is 11:13 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"