A blank line is still a line. ALINES relies on a Chr(10) or Chr(13) to delineate the end of each line unless you specify some other character(s). You probably have at least one of these characters at the end of your 7th line, which would give you 8 lines. If you want to remove these trailing characters from your memo field before calling ALINES, I have a utility called CLEANMEMO that you can download from
www.peisch.com/downloads.html.
>Hello all
>
>I have a text file with 7 lines and 8th line is blank when i issue
>lcFile=Filetostr(cfile)
>numLines=Alines(aTextArray,lcFile)
>
>i get numlines as 8 how to get it to 7
>
>txs