View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] andrew.taylor@cantab.net is offline
external usenet poster
 
Posts: 1
Default Finding the number of rows on a worksheet

Depending on the format of your worksheet, and on exactly what you mean
by
"populated", you might be able to use something like
Application.CountA ("A:A") or ActiveWorksheet.UsedRange.Rows.Count

Andrew Taylor


Jonathan wrote:
Hello,

I am writing a VBA procedure in MS-Access 2002 to read rows from an Excel
worksheet and copy them to an Access table. Is there a way to know the total
number of populated rows without reading through all of them and looking for
an end of range marker such as an empty cell? That's what I'm doing
currently. Unfortunately some populated rows have empty cells.



Thanks in advance

--
Jonathan
KingsKinght1 <at hotmail <dot com