Function IsTopOfPage(SheetName As String, RowNumber As Long) As Boolean
With Worksheets(SheetName)
IsTopOfPage = .Rows(RowNumber).PageBreak <> xlPageBreakNone
End With
End Function
Just pass it the name of worksheet (as a String value) and the row number of
the cell you want to check and it will return True if that cell is located
on the top row of a page.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.