Use Line Input statement:
Code:
Dim FF As Integer: FF = FreeFile
Dim strLine1 As String
Dim strLine2 As String
Dim strLine3 As String
Open "C:\windows\desktop\myfile.txt" For Input As #FF
Line Input #FF, strLine1
Line Input #FF, strLine2
Line Input #FF, strLine3
Close #FF
JUST AN UPDATE IF YOU DON'T KNOW THE LENGTH OF THE FILE:
Code:
Dim FF As Integer: FF = FreeFile
Dim strLine() As String
Dim Index As Integer
ReDim Preserve strLine(Index)
Open "C:\windows\desktop\myfile.txt" For Input As #FF
Do While Not EOF(FF)
Line Input #FF, strLine(Index)
Index = Index + 1
ReDim Preserve strLine(Index)
Loop
Close #FF
[Edited by QWERTY on 07-18-2000 at 05:17 PM]