Programming Reference Manual
 
Syntax
 
LineCount(text$)
 
Description
Returns an Integer representing the number of lines in text$.
 
Lines are delimited by carriage return, line feed, or both.
 
Parameter
Description
text$
String containing the text from which the lines will be extracted.
See Also
Example
 
Sub Main
‘This example reads your autoexec.bat file into a
‘variable and then ‘determines how many lines it is
‘comprised of.
 
    file$ = “c:\autoexec.bat”
    Open file$ For Input As #1
    Do Until Eof(1)
        Line Input #1,lin$
        txt = txt & lin$ & vbCrLf
    Loop
    lines! = LineCount(txt)
    MsgBox “’” & file$ & “’ is “ & lines! & _
                 “ lines long!” & vbCrLf & txt
End Sub