|
-
October 3rd, 2001, 08:15 PM
#1
Using a Two-Dimensional Dynamic Array
Hi.
How will I declare a two-dimensional dynamic array and redimension it later? For instance, I have an array like this:
Array1(x,2)
where there are two columns fixed, and a variable number of rows which can later be redimensioned, to something like this:
x=x+1
Redim Preserve Array1(x,2)
but I got this error:
Run-time error '9':
Subscript out of range
if I declared my array like this:
Dim Array1() as String
If I declared my array like this:
Dim Array1(0,2) as String
I got a Compile error saying that the array was already dimensioned when I reached the Redim line.
Any help is appreciated!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|