5k 行,即使有 600 列也不应该花那么长时间。阻止可能是将值写入单元格。最好填充一个二维输出数组并将值一次性写入电子表格。这是一个例子。
Sub ReadTextFile()
Dim sFile As String
Dim lFile As Long
Dim vaLines As Variant, vaSplit As Variant
Dim aOutput() As String
Dim i As Long
Dim sInput As String
sFile = MyDocs & "Book4.csv"
lFile = FreeFile
'Read in data
Open sFile For Input As lFile
sInput = Input$(LOF(lFile), lFile)
'Split on new line
vaLines = Split(sInput, vbNewLine)
'Set up output array - split is zero based
'but you want 1-based to write to cells
ReDim aOutput(1 To UBound(vaLines, 1) + 1, 1 To 1)
'loop through lines
For i = LBound(vaLines) To UBound(vaLines)
If Len(vaLines(i)) > 0 Then
'split on delimiter
vaSplit = Split(vaLines(i), ";")
'store want you want in the output array
aOutput(i + 1, 1) = vaSplit(15)
End If
Next i
'write the output array to a range
Sheet1.Range("A2").Resize(UBound(aOutput, 1), UBound(aOutput, 2)).Value = aOutput
End Sub