View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Richard Buttrey[_5_] Richard Buttrey[_5_] is offline
external usenet poster
 
Posts: 10
Default How to determine the length of a .prn file.

One of my VBA macros opens and then imports a .prn or .txt file into
an excel workbook.

Sometimes the number of records in the file exceed the maximum rows
permitted by a single Excel worksheet.

How can I test for the number of rows in the file before opening,
parsing and copying it into my workbook? If it exceeds say 65500 rows
I'd like to pop up a message and then exit the Sub.

TIA

Richard Buttrey