• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 537
  • Last Modified:

Redim Preserve - Basic Question

I want to turn this array...

a(1) = "foo"
a(2) = "bar"

...into this array...

a(1,1) = "foo"
a(1,2) = "bar"

...using Redim Preserve.  I am sure it's possible.  But I can't work out the syntax.

0
shacho
Asked:
shacho
  • 4
  • 2
2 Solutions
 
shachoAuthor Commented:
Does this not work with lbound 1 arrays?
0
 
shachoAuthor Commented:
a.k.a. "base 1" arrays?
0
 
shachoAuthor Commented:
a(0,0) = "foo"
a(0,1) = "bar"

would also be fine.

Point is I want to figure out how to use Redim.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
GrahamSkanRetiredCommented:
You cannot change the number of dimensions with a Redim
0
 
GrahamSkanRetiredCommented:
Mike,
To ecpand on that:

You would have to create a second array, Redim that with the wanted number of dimensions and fill it from the first.

Also, when you Redim a multi-dimensional array, you can only change the size of the last dimension,

0
 
shachoAuthor Commented:
Oh well.  Thanks for the comments.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now