MarrowGenx
MIS
I am attempting to redim my multi-level array as I am creating it, but I keep running into problems. I can not find a way to redim preserve my multi-level array. Here is the code that I am currently using:
Do Until xlWorksheet.Application.ActiveCell.Value = ""
intCountAct = intCountAct + 1
ReDim Preserve arrActDump(intCountAct, 3)
arrActDump(intCountAct, 1) = & _ xlWorksheet.Application.ActiveCell.Value
arrActDump(intCountAct, 2) = & _ xlWorksheet.Application.ActiveCell.Offset(0, 2).Value
arrActDump(intCountAct, 3) = & _ xlWorksheet.Application.ActiveCell.Offset(0, 4).Value
xlWorksheet.Application.ActiveCell.Offset(1, 0).Select
Loop
The code basically loops through an excel workbook and counts each cell that has a value. Then the code redims the array so that the new values will fit into the array. When I attempt to redim preserve the second time through the loop I get an error. Any help is much appreciated.
Marrow
Do Until xlWorksheet.Application.ActiveCell.Value = ""
intCountAct = intCountAct + 1
ReDim Preserve arrActDump(intCountAct, 3)
arrActDump(intCountAct, 1) = & _ xlWorksheet.Application.ActiveCell.Value
arrActDump(intCountAct, 2) = & _ xlWorksheet.Application.ActiveCell.Offset(0, 2).Value
arrActDump(intCountAct, 3) = & _ xlWorksheet.Application.ActiveCell.Offset(0, 4).Value
xlWorksheet.Application.ActiveCell.Offset(1, 0).Select
Loop
The code basically loops through an excel workbook and counts each cell that has a value. Then the code redims the array so that the new values will fit into the array. When I attempt to redim preserve the second time through the loop I get an error. Any help is much appreciated.
Marrow