Understanding Open xxx For Input As #6
I am using an Open xxx For Input As #6 to open and read in some text.
The code I have works fine when I use it in a program where it is the only code in the program. (I did this to test it out) However when I insert it into a larger program my input is not correct. Can't say where it's comming from.
I've checked out my path and it's good. However I do not under stand the number 6 and it's roll in this. I suspect this needs to be a number not used, and someplace in my larger program it must be used for something else. This is the only "Open xxx For Input As" I have in the program.
My code is:
Dim TheText As String
Dim j As Integer, i As Integer
Open "O:\14211\Calibration support software\ML2530\sensor CF data\Asset 54815.rtf" For Input As #6
Line Input #6, TheText 'read in the the header info
For i = 1 To 10
Line Input #6, TheText 'read in the data line into a string
MsgBox "" + TheText