Thanks for stopping by =)
So, I have a reference array I want to build a subset of for use in a function.
The reference is a long array of values, the array I need will only need some of the values and as I know the positions in the reference, i thought I'd set up a for-loop.
Unfortunately, this gives me an index out of bound for the first step in the for-loop.
The direct window gives an output of 10, so vRef(0) seems to work as it should.
So, I have a reference array I want to build a subset of for use in a function.
The reference is a long array of values, the array I need will only need some of the values and as I know the positions in the reference, i thought I'd set up a for-loop.
Code:
dim vArr(), vRef
vRef = Array(10,20,30,40,50,60,70,80)
for i = 0 to 5
debug.print(vRef(i))
vArr(i) = vRef(i)
next
Unfortunately, this gives me an index out of bound for the first step in the for-loop.
The direct window gives an output of 10, so vRef(0) seems to work as it should.