Read Sequential Access Files : Sequential Access Files « File Path « VBA / Excel / Access / Word






Read Sequential Access Files

 
Public Sub ReadSeqFile()
    Dim filePath As String
    Dim I As Integer
    Dim myHeader As String
    I = 1
    filePath = ActiveWorkbook.Path & "\MyHeaders.txt"
    Open filePath For Input As #1
    Do While Not EOF(1)
        Input #1, myHeader
        Cells(1, I).Value = myHeader
        I = I + 1
    Loop
    Close #1
End Sub

 








Related examples in the same category

1.Create Sequential Access Files
2.Write and read Sequential Access Files