I'm getting a "Subscript out of range (Error 9)" on the 3rd line in the attached code.
The ReDim Preserve is in a loop where I need to add incremental rows to the array, the width will always stay constant at 10.
Any ideas what I'm doing wrong? (I know I've gotten this to work before, but can't see what I've done differently here)
Note: Option Base = 1
VB Code:
Dim MyArray() As Integer 'Later ReDim MyArray(1, 10) 'Later still ReDim Preserve MyArray(UBound(MyArray, 1) + 1, 10)




Reply With Quote