Example:
Sub Main
Open "c:\test.txt" For Input As #1
Do While Not EOF(1)
MyStr = Input(10, #1)
MsgBox MyStr
Loop
Close #1
End Sub
Sub Make3Files ()
Dim I, FNum, FName ' Declare variables.
For I = 1 To 3
FNum = FreeFile ' Determine next file number.
FName = "TEST" & FNum
Open FName For Output As FNum ' Open file.
Print #I, "This is test #" & I ' Write string to file.
Print #I, "Here is another "; I
Next I
Close ' Close all files.
End Sub