Isn't this code supposed to open a file? It's not working. There is no error but it doesn't open file but then debugs on line input.
![]()
Sub DemoWhileClause() ' Page 87 Middle Open "C:\Users\amartino\Desktop\invoice.txt" For Input As #1 r = 1 Do While Not EOF(1) Line Input #FileNumber, Data If Not Left(Data, 5) = "TOTAL" Then ' Import this row r = r + 1 Cells(r, 1).Value = Data End If Loop Close #1 End Sub
Bookmarks