Question: I would like to find out the first row number of the page1. 

Using the following code can find the last row number of page 1.

```
ThisWorkbook.Worksheets("Sheet1").HPageBreaks(1).Location.Row - 1

```

But I have to find the first row number of Page1.

Would anyone has idea on it?

Thanks a lot

Answer: 
You can use SpecialCells to get the first visible row.

The below code will return back the address for the first visible row of the ActiveSheet

```
msgbox ActiveSheet.Cells.SpecialCells(xlCellTypeVisible).Rows(1).Address

```

or if you just want the row number

```
msgbox ActiveSheet.Cells.SpecialCells(xlCellTypeVisible).Rows(1).Row

```
The following is not the nicest way of coding I have to admit. But I think, it is easy to read and it does the job (if I understood the problem correct).

```
Sub runningThroughSheets()

  Dim wsht As Worksheet
  Dim wholeRow As Range
  Dim counter As Integer
  Dim stopSearch As Boolean

  Set wsht = Application.ActiveWorkbook.Worksheets("Sheet1")

  counter = 0
  stopSearch = False
  Do While stopSearch = False
    If Range("A1").Offset(counter, 0).EntireRow.Hidden = False Then
        stopSearch = True
    End If
    counter = counter + 1
  Loop

  MsgBox counter

End Sub

```