Programming Reference Manual
 
Syntax
 
FileLines (filename$)
 
Description
Returns a Long Integer containing the number of lines of text in filename$.
 
The number of lines is determined by counting the number of line-separators in the file (CR/LF, CR or LF characters).
 
NOTE: Use this function only on text (ascii) files. 
 
Parameter
Description
filename$
This string value is the path and name of the file. A path relative to the current directory can be used.
See Also
Example
 
Sub Main
F$ = Dir$(“*.txt”)
While F$ <> “”
Debug.Print F$;” “;FileLines(F$)
F$ = Dir$()
Wend
End Sub