Glaswegian
04-12-2011, 02:44 AM
Hi
I'm using Chip Pearson's ImportBigFiles code but the code keeps crashing on one particular line. I've used Chip's code many times over the years and never had a problem.
The test file does contain around 2 million records but there are only 6 columns of data. The data looks like this
00000056855372;AM;0002;00000081288515; ;0419
and this is the line that crashes - it's always record number 1,047,937. I even deleted the above line from the text file but the code still crashes - on the same line number.
These are the code lines
If Colndx + C_START_COLUMN <= WS.Columns.Count Then
WS.Cells(RowNdx, Colndx + C_START_COLUMN).Value = Arr(Colndx)
Else
The red line is where the code stops.
Looking at the workbook there are only 18 sheets created when the code stops so I don't believe this is the problem.
Has anyone run into this problem before? Could it be an Excel memory issue perhaps? I've closed all other applications but it makes no difference.
Any suggestions most welcome.
Thanks.
I'm using Chip Pearson's ImportBigFiles code but the code keeps crashing on one particular line. I've used Chip's code many times over the years and never had a problem.
The test file does contain around 2 million records but there are only 6 columns of data. The data looks like this
00000056855372;AM;0002;00000081288515; ;0419
and this is the line that crashes - it's always record number 1,047,937. I even deleted the above line from the text file but the code still crashes - on the same line number.
These are the code lines
If Colndx + C_START_COLUMN <= WS.Columns.Count Then
WS.Cells(RowNdx, Colndx + C_START_COLUMN).Value = Arr(Colndx)
Else
The red line is where the code stops.
Looking at the workbook there are only 18 sheets created when the code stops so I don't believe this is the problem.
Has anyone run into this problem before? Could it be an Excel memory issue perhaps? I've closed all other applications but it makes no difference.
Any suggestions most welcome.
Thanks.