views:

75

answers:

1

i have an array:

Dim qcNo(4, 2, 350) As String

the problem i have is that sometimes there is a requirement for the matrix to be bigger. i need the 350 to sometimes go to 1000.

is it possible to do a redim preserve on a 3 dimensional array?

if so, how would i do it?

+2  A: 

Preserve will maintain the existing values.

Dim qcNo() As String

Redim qcNo(4,2,350) as string


Redim Preserve qcNo(4, 2, 1000) as string
Jeff O
I don't get it. He said REDIM PRESERVE in his question, so how does this provide anything that wasn't already there?
David-W-Fenton
Because he asked "if it was possible" which means he questioned whether or not this would work and the code in my answer demonstrates that it does. Sorry I did not include an explanation.
Jeff O
But why could he just not fricking try it himself? He does this kind of thing all the time, asking questions that he apparently knows the answers to for no purpose that I can detect.
David-W-Fenton
Then vote him down or ignore him and he'll go away.
Jeff O