Variables in Declaring an Array
Take a look for help on the redim statement (note the key work preserve is
required to not clear the values of the array when it is resized.)
dim myArray() as sting
dim n as long
n = 0
redim preserve myArray(n)
myarray(0) = "this"
n = 1
redim preserve myarray(n)
myarray(0) = "that"
--
HTH...
Jim Thomlinson
"Jimmy" wrote:
Dim myArray(0 To n) As String
The dimensions of this array change throughout.
Why can't I use the variable 'n' in the declaration?
And, more importantly, can someone help me solve this problem?
Thanks,
Jimmy
|