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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

redim preserve multi dimension array problem!!

Status
Not open for further replies.

anyideas

Programmer
May 2, 2002
127
GB
hi all,

I have an array:
errorArray(20,20)

I can redim the array:
redim errorArray(15,15)

But I can't redim preserve the array:
redim preserve errorArray(15,15)

Does anyone know why??

Cheers Mark
 
From MS VBscript Language reference:

If you use the Preserve keyword, you can resize only the last array dimension, and you can't change the number of dimensions at all. For example, if your array has only one dimension, you can resize that dimension because it is the last and only dimension. However, if your array has two or more dimensions, you can change the size of only the last dimension and still preserve the contents of the array.

hth
 
ah, so that would be the problem then!

thanks

cbokowski
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top