Converts one or more sets to an array for use in a user-defined function.
SetToArray(«Set»[, «Set»...][, «Numeric Expression»])
This function converts one or more sets to an array for use in a user-defined function. The number of dimensions in the resulting array is the same as the number of sets specified.
The optional numeric expression can be used to provide the values in the array cells. If omitted, the default value of the set member is used for the array cell value.
The cell coordinates in the resulting array correspond to the position of the sets in the list. For example, SetToArray(SA, SB, SC), where each set has two elements, produces the three-dimensional array:
(SA1, SB1, SC1) (SA2, SB1, SC1) (SA1, SB2, SC1) (SA2, SB2, SC1) (SA1, SB1, SC2) (SA2, SB1, SC2) (SA1, SB2, SC2) (SA2, SB2, SC2)
Note The return type of SetToArray is the VARIANT type VT_ARRAY. For that reason, the output of SetToArray should be used only as input to a user-defined function.