Code: Select all
Private Sub Command3_Click()
Dim File As Integer
Dim TextOfLine As String
Dim Path As String
Dim sngStartTime As Single
Dim sngTotalTime As Single
sngStartTime = Timer
File = FreeFile
Open "C:\TEMP\2011.TXT" For Input As File
While Not EOF(File)
Line Input #File, TextOfLine
'...
Wend
Close File
sngTotalTime = Timer - sngStartTime
Me.Label6.Caption = Round(sngTotalTime, 2)
Me.Label5.Caption = "STOP"
End Sub
Now with a file approx dimension 100 mb the cursor lock on "While Not EOF(File)" and freeze trhe macro.(no error but lock)
I need in other case to read the txt line by line