Redim Preserve
allows you to change the dimensions of an array while keeping the contents of the array.
The Redim Preserve
at the end of each loop is adding another row to the array.
I think the second loop is appending to the array because the i
variable is not changed between the loops.