How to determine a range size
-----Original Message-----
I want to know the number of data lines in an imported
file (text file), so I can define an exact range using
VBA
after it's imported. Is there a function I can use?
.
After the file is Imported
'get in the range
Range("A2").select
nr = activecell.currentregion.rows.count
or
nr = application.worksheetfunction.counta(Range("A:A"))
Regards
Peter
|