I was amazed to see, this morning, that Line Input fails when trying to read the first line of a large (36MB) comma-delimited text file.
There are more than 65K lines in the file, so a cheap Import into Excel fails. Access barfs on the first line (but I really think it's a different problem, because Access barfed on the first line of a different file (12MB) but Excel managed to read 32K lines of it.
Why should LINE INPUT throw up its hands? I thought it might read a buffer of, perhaps, 64K and then parse the lines out of that.
In the code sample below I have disabled the offending lines. The new lines (for Binary Read) work, returning a gob of text each time, which, presumably, I must break into lines, and then parse.
A pox on Line Input!
<pre>Sub test()
Dim intFile As Integer
intFile = FreeFile
Dim strFilename As String
strFilename = "C:GreavesProductsGeographyNAmericaUSACaliforniaCA _deci.txt"
' Open strFilename For Input As #intFile
Open strFilename For Binary As #intFile
While Not EOF(intFile)
Dim strLine As String
' Line Input #intFile, strLine
strLine = Input(1024, intFile)
Wend
Close intFile
End Sub
</pre>



