Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redim Preserve giving error

Status
Not open for further replies.

duffs

Programmer
Sep 22, 2000
48
US
I have a 2-dimentional array:
testArray(0,0) = "hi"
testArray(0,1) = "there"
testArray(1,0) = "mighty"
testArray(1,1) = "dog"
testArray(2,0) = ""
testArray(2,1) = ""
testArray(3,0) = ""
testArray(3,1) = ""

I'm trying to resize it using:
Redim preserve testArray(1,1)

If I leave out "preserve" it works fine, but of course I lose my data. When I put in preserve, it started giving me this error:
"subscript out of range."

Any ideas?
TIA, Susie
 
I've answered my own question. The redim preserve will only let you change the last dimension.

--Susie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top