-
This code works great but could someone explain what the line 'Line Input#1,strTemp' means? or what it does exactly?
I understand the rest of the code but not that line.
Thanks
Dim strTemp As String
Open "C:\txt.txt" For Input As #1
Do Until EOF(1) = True
Line Input #1, strTemp '---------this line here!!!
If Text1.Text = "" Then
Text1.Text = strTemp
Else
Text1.Text = Text1.Text & vbCrLf & strTemp
End If
Loop
Close #1
-
Line Input reads a line from the file and places it in a variable. In this case it's strTemp.
-
Do Until EOF(1) = True (this line takes the next line into a loop until End Of File=true.(1) is the file (Open "C:\txt.txt" For Input As #1))
Line Input #1, strTemp (here the program reads one and one line from #1 and stores it in strTemp)