Computer Science Canada

Read From Text File

Author:  TheXploder [ Fri Feb 04, 2005 8:36 pm ]
Post subject:  Read From Text File

I got this part but I don't know how to make it take something out of the file:

code:

Dim Map(1 To 10, 1 To 10) As Integer

Private Sub Command1_Click()
    Open "D:\visual projects\2005\array.txt" For Input As 1
        Print #1, Text1.Text
    Close 1
End Sub


I'm guessing that there should be another function instead of print.

Author:  Brightguy [ Fri Feb 04, 2005 11:49 pm ]
Post subject:  Re: Read From Text File

You can use the Line Input statement to read text from a file. It reads all text until a newline.
code:
Line Input #1, strText


: