I am attempting to read text file (these files are produced by external program, that could not be tweeked) using the following macro.
While Not EOF(int_cur
May I interest you in a better way of reading text files in VBA?
This will read the entire text file in ONE GO
in an array and then close the file. This way you don't need to keep the file open at all times.
Option Explicit
Sub Sample()
Dim MyData As String, strData() As String
Dim i As Long
'~~> Replace your file here
Open "C:\MyFile.Txt" For Binary As #1
MyData = Space$(LOF(1))
Get #1, , MyData
Close #1
strData() = Split(MyData, vbCrLf)
'
'~~> Now strData has all the data from the text file
'
For i = LBound(strData) To UBound(strData)
Debug.Print strData(i)
'
'~~> What ever you want here
'
Next i
End Sub