Untested Pseudo code, but:
For Each nItem In FillRange(1, 4)
Debug.Print nItem
Next
Function FillRange(nStart As Int, nStop As Int) As Int()
For i = nStart To nStop
Redim arrResult(UBound(arrResult) + 1)
arrResult(UBound(arrResult)) = i
Next
FillRange = arrResult
End Function
[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]