T
Terry
I need to reset an array to its uninitialised state, i.e. nothing in it. How
would I do that please?
Regards
would I do that please?
Regards
Gerald Stanley said:If the dimensions of the array were set when it was
dimensioned, then you would have to use a For Loop to
initialise each element individually.
Terry said:Thanks Dirk,
I need to get an existing array back to the state before it was
dimensioned, Erase may appear to do that, I'll give it a go in my
context.
The problem I have is in removing rows and resorting the data leaving
the last row to be discarded. ReDim Preserve appears to not only keep
the data but also preserves the array dimensions. i.e. If the
uBound(MyArray) gives 3, ReDim Preserve MyArray(1 to 2) does not
discard the last row but preserves everything. I am copying the data
into a temp array, selecting a row to discard, re-sorting downwards
to leave the last row unwanted, redim the source array with one less
row, copy the required data back from the temp array. However I need
the original source array to be un-initialised. Convoluted I know,
but it nearly works for me.
Thanks guys