I have an array variable called: arrVal()
It contains the words 1 - 10 - {"One","Two","Three","......","Ten"}
I successfully added an extra value to it, using:
Code: Select all
arrVals(UBound(arrVals)) = "Eleven"
ReDim Preserve arrVals(1 To UBound(arrVals) + 1)
-- arrVals(UBound(arrVals)) = "Eleven" (I would have thought this would overwrite the last value "Ten"??)
-- ReDim Preserve arrVals(1 To UBound(arrVals) + 1) (And only now do we add a new element to the array??)
Just some clarity for understandng, please.
TX