Hi TheOne,
as for your code, it is possible you reached empty line. Did you checked nLines returned 3 at the moment?
Here is alternative way - you can load CSV file using single line of code to array, where first index will mean rows(lines) and second index columns.
(of course, the file must exist):
Uses "Console"
Dim sFileLines() As String
' nLines = number of lines found
' File says to parse command it is not parsing string, but the string is file name of file to be parsed
' $CRLF is end of line character
' "," defines per line separator
Dim nLines As Long = Parse(File "textFile.txt", sFileLines, $CRLF, ",")
Dim nLine, nColumn As Long
' Here we can reconstruct the file printing the contents from array
For nLine = 1 To nLines
For nColumn = 1 To UBound(sFileLines, 2)
Print sFileLines(nLine, nColumn)+","
Next
PrintL
Next
WaitKey
Let me know,
Petr
Bookmarks