The Preserve tells ReDim to keep the values in the array youre modifying. It only works for the last dimension of the array, meaning:
Code:Dim Temp() ReDim Temp(10) 'Create empty 1D array ReDim Preserve Temp(20) 'Change size of last dimension ReDim Temp(10, 10) 'Create empty 2D array ReDim Preserve Temp(10, 20) 'Change size of last dimension ReDim Preserve Temp(20, 20) 'Change size of more dimensions - won't work Erase Temp 'Release memory
About your type: Should work, the errer must be somewhere else..




Reply With Quote