Private Sub MaxLengthFileLinesSample()
Const strFn = "MaxLengthFileLinesSample"
Dim strInFile As String
strInFile = CombinePathAndFile(GetWindowsDirectory, "WIN.INI")
strInFile = InputBox("Input file: ({Esc} cancels.)", strFn, strInFile)
If Len(strInFile) = 0 Then Exit Sub
MsgBox "Return = " & MaxLengthFileLines(strInFile) & " (-1 means failure; otherwise is length of longest line in file.)", vbInformation, strFn
End SubCopyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.