CB.DefineDecVarND Example 5

This example defines a new decision variable in cell G8 with a lower bound of 10, an upper bound of 40, no step size, a title of Net Income, and a decision variable type of Custom. The values of Min and Max are ignored for Custom decision variables, but they must be entered since they are required parameters for CB.DefineDecVarND. If a step size is entered for this decision variable type, it is ignored.

Range("G8").Select
CB.DefineDecVarND 10,40,,"Net Income",cbDecVarTypeCustom, "10,20,30,40"

Note that the data string (the customData parameter) can also be a valid cell range. If the data string in the previous code is stored in range A1:D1, the code becomes:

Range("G8").Select
CB.DefineDecVarND 10,40,,"Net Income",cbDecVarTypeCustom,"A1:D1"