Alex Gordon
Alex Gordon

Reputation: 60691

vba: multi-dimensional arrays REDIM

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?

Upvotes: 1

Views: 3515

Answers (1)

JeffO
JeffO

Reputation: 8043

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

Upvotes: 2

Related Questions