Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Ernesta Fernandez   on Dec 12 In MS Office Category.

  
Question Answered By: Brendan Smith   on Dec 12

It sounds like you are trying to determine the number of
records in a worksheet and that a record are defined as a row
in the sheet. You may find the CurrentRegion property useful.
I chose to use Cells(1,1) because your code  indicated it was
a valid field in a valid record.


Dim iRecordCount As Integer



iRecordCount = Sheet2.Cells(1, 1).CurrentRegion.Rows.Count

For I = 1 To iRecordCount

Share: 

 
 


Tagged: