I'm creating a VBA code to read a .txt with aproximately 10k lines and 105k words, currently I got this:
Sub GetTxt()
Dim objFSO As Object
Dim objTF As Object
Dim strIn 'As String
Dim X
PilarTxt = Range("C1")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTF = objFSO.OpenTextFile(Sheets("Controle").Range("C3") & "" & PilarTxt & "\PARTEPL.LST", 1)
strIn = objTF.readall
X = Split(strIn, vbNewLine)
[b3].Resize(UBound(X) + 1, 1) = Application.Transpose(X)
objTF.Close
End Sub
It reads the .txt and inputs it to the B3 and downward cells.
It's very good, because it's the faster one I found online, but it doesn't copy all of the .txt data.
Can anyone help me solve this? A fast script to read all of the .txt?
Sub GetTxt()
Dim objFSO As Object
Dim objTF As Object
Dim strIn 'As String
Dim X
PilarTxt = Range("C1")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTF = objFSO.OpenTextFile(Sheets("Controle").Range("C3") & "" & PilarTxt & "\PARTEPL.LST", 1)
strIn = objTF.readall
X = Split(strIn, vbNewLine)
[b3].Resize(UBound(X) + 1, 1) = Application.Transpose(X)
objTF.Close
End Sub
It reads the .txt and inputs it to the B3 and downward cells.
It's very good, because it's the faster one I found online, but it doesn't copy all of the .txt data.
Can anyone help me solve this? A fast script to read all of the .txt?