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