If you're using Excel 2000 or later you could use
ListOfValues = "1,2,3"
ArrayListOfValues = Split(ListOfValues,",")
Juan Pablo G.
Sure. Declare an array and fill it's values. But you will also need to dynamically size the array, unless it's always going to have the same number of values. For example:
Dim aintList() as Integer
Dim intCount as Integer
intCount = 1
' ... your code
' now you want to define the values
aintList(1 to intCount) = MyValue
intCount = intCount + 1
' if you want to add another value:
ReDim Preserve aintList(1 to intCount)
aintList(intCount) = MyNextValue
intCount = intCount + 1
' etc. - you could also do this in a loop...
Selection.Subtotal, yada, yada, TotalList:=aintList
================
Get the picture? If you are always going to have 3 values in your TotalList array, you can just define your array like this:
Dim aintList(1 to 3) as Integer
and then assign values to the 1,2, and 3 positions in the array.
Hope this helps,
Russell