haddy27
04-24-2007, 07:52 AM
I am writing a macro that uses the Solver add in in Excel.
I can get the Solver to work fine, although once it has run I get an 'Solver Results Box', where you can choose to keep the results from the Solver or restore original values.
I can't work out how I can automate the response to this to click OK each time this box appears to save doing it for every record.
The code I have already to run the Solver is:
Sheets("Iain1").Select
SolverOk SetCell:="$I$13", MaxMinVal:=3, ValueOf:="0", ByChange:="$I$6"
SolverSolve
Any help would be appreciated!
haddy27
I can get the Solver to work fine, although once it has run I get an 'Solver Results Box', where you can choose to keep the results from the Solver or restore original values.
I can't work out how I can automate the response to this to click OK each time this box appears to save doing it for every record.
The code I have already to run the Solver is:
Sheets("Iain1").Select
SolverOk SetCell:="$I$13", MaxMinVal:=3, ValueOf:="0", ByChange:="$I$6"
SolverSolve
Any help would be appreciated!
haddy27