Mega Code Archive

 
Categories / VisualBasic Script / File Path
 

Read a text file, skipping the Total lines

Sub textDemo()     Open "C:\Invoice.txt" For Input As #1     Do Until EOF(1)         Line Input #1, Data         If Not (Data, 5) = "TOTAL" Then             Debug.Print Data         End If     Loop     Close #1 End Sub