Hi,
ReDim statement is used to change the size of a dynamic array in procedure level.
Preserve keyword is used to preserve the data in an existing array when you change the size.
Ex
'
' Declare Dynamic Array
'
Dim AnArray() As Integer
'
' Now allocate the size
'
ReDim AnArray(2) As Integer
'
'Now An Array has bound 0 to 2
'
AnArray(0) = 100
AnArray(1) = 300
AnArray(2) = 400
'
' Change the size
'
ReDim AnArray(10) As Integer
'
' Now AnArray size is changed but all the values in that array are lost
'
' To preserve the existing values use Preserve keyword
'
' Change the previous code as
ReDim Preserve AnArray(10) As Integer
In your code if IncludeBlank flag is set, you are change the size of mClassCodes array to 1 ( 0 to 0).
For the other data of Class Codes, you are changing the size one by one with preserving the existing values.