Èítanie textového súboru po riadkoch

Dim i As Integer, str As String
i=FreeFile
Open "C:\autoexec.bat" For Input As #i
Do While Not EOF(i)
Line Input #i, str
Debug.Print str
Loop
Close #i