Can't you pick the first and last number in the array, and then generate all numbers in between?
like this:
Public Function Generate()
dim FirstNum as integer
dim LastNum as integer
dim TempString as string
dim myArray
FirstNum = 0 'Or whatever the first number is.
LastNum = 10 'Or whatever your last number is.
for a = FirstNum to LastNum
TempString = TempString & a & ";"
next a
myArray = split(TempString,";",-1,vbTextCompare)
End Function
This piece of code will create an Array containing the all numbers between (and included) the FirstNum and the LastNum.
Hopes this helps.
The Fog




Reply With Quote