ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA SolverOK not inputting all values into Solver... (https://www.excelbanter.com/excel-programming/323966-vba-solverok-not-inputting-all-values-into-solver.html)

Paul

VBA SolverOK not inputting all values into Solver...
 
I am using VBA to invoke and configure Solver, but all of the information is
not being inserted by the SolverOK VBA command:

SolverOk SetCell:="$B$53", MaxMinVal:=3, ValueOf:="25",
ByChange:="$B$46:$B$51"

The value for the Set target cell field is to be $B$53 and the By changing
values field to be $B46:$B51. The value of 25 is inserted and the correct
logic is set (MaxMinVal;=3), which equates the target cell ($B$53) with the
value of 25. The balance of the code (constraints and options) works OK.

Why are the SetCell and ByChange values not making it into Solver using VBA
SolverOK?


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com