Hi All,
Does anybody know what is the maximum size (length) for one dimensional array?
I have declared an array as Variant and array index as Long, however when I try to populate the array with a data it gives me an Overflow error (number 6) when it reach 32768 - which my understanding is a maximum limit for an Integer type variables.
I can write procedure that will empty the array to a file but I'd like to avoid that situation if I could.
Does anybody know how to solve this problem?
Here is the code, it works, but if you change lndx value to be one greater (32768) it gives an overflow error.
Sub Main
dim lNdx as variant
dim arr() as variant
lndx = 32767
redim preserve arr(lndx)
msgbox ubound(arr)
End Sub
regards, Dom
Does anybody know what is the maximum size (length) for one dimensional array?
I have declared an array as Variant and array index as Long, however when I try to populate the array with a data it gives me an Overflow error (number 6) when it reach 32768 - which my understanding is a maximum limit for an Integer type variables.
I can write procedure that will empty the array to a file but I'd like to avoid that situation if I could.
Does anybody know how to solve this problem?
Here is the code, it works, but if you change lndx value to be one greater (32768) it gives an overflow error.
Sub Main
dim lNdx as variant
dim arr() as variant
lndx = 32767
redim preserve arr(lndx)
msgbox ubound(arr)
End Sub
regards, Dom