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$ ForInput As #1 Do Until Eof(1) LineInput #1,lin$ txt = txt & lin$ & vbCrLf Loop lines! = LineCount(txt) MsgBox "’" & file$ & "’ is " & lines! & _ " lines long!" & vbCrLf & txt EndSub