Using Redim Preserve to change first dimension

ezyeric
10-02-2001, 10:06 PM
I have an array which a declared like so...

Global MsgArray()

Then in a function I Redimed it like so...

Redim MsgArray(0,1)

I want to make the first dimension higher. But won;t let me when I do.

Redim Preserve MsgArray(1,1)

Gives error "subscript out of range"

I understand ya not supposed to be able to change first dimension when using preserve...only last dimension. But isn't there a way around this? Or something else I can do?

Please,

Thanx,

Eric

Timbo
10-02-2001, 10:17 PM
nope, unless you don't mind transposing your array from:

col0 | col1
row0|
row1|
row2|

to

row0|row1|row2
col0 |
col1 |

erm, as in:

Global MsgArray(2,0)
....
Redim Preserve MsgArray(2,1)


"He who dares my son!.. He who dares.." - Del-Boy Trotter

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum