Consulting

Results 1 to 4 of 4

Thread: Can VBA determine the first row number of each page?

  1. #1

    Can VBA determine the first row number of each page?

    Can VBA determine the first row number of each page of a long sheet?

    Excel 2016

  2. #2
    By Dave Hawley (RIP)
    Sub GetPageBreaksRows()
    Dim hPB As HPageBreak
    Dim lRow As Long
     If ActiveSheet.HPageBreaks.Count > 0 Then
     For Each hPB In ActiveSheet.HPageBreaks
     lRow = hPB.Location.Row
     MsgBox lRow
     Next hPB
     End If
     
    End Sub

  3. #3
    Thanks

  4. #4
    You're welcome

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •