Link to home
Start Free TrialLog in
Avatar of samsoro
samsoro

asked on

VBA to Accept Solver result

I used to know how to do this but have forgotten...

I am running a couple of solver scenarios in sequence, and would rather not click on "OK" to accept the result from each scenario.  This action does not show up in the code when recording a macro.
Avatar of reedsr
reedsr

have you tried:

Application.DisplayAlerts = False

... Code for solver ...

Application.DisplayAlerts = True

make sure you turn it back to true or else you won't get alerts when the macro is done running
Avatar of samsoro

ASKER

Actually that does not appear to work either....but I did some further digging and here is the right answer:

SolverSolve userfinish:=True

When recording a macro, it records 'SolverSolve', but not the last part.

If anyone can point me to where documentation on this stuff, I would be happy to award the points.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of reedsr
reedsr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial