![]() |
To determine that cell is on top of page
Hi,
Is there a way to determine that the cell is on the top of the page, e.g. in Page Break Preview? Thank you. -- Andrei. |
To determine that cell is on top of page
I think this function will do what you want...
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. -- Rick (MVP - Excel) "Andrei Zakharov" wrote in message ... Hi, Is there a way to determine that the cell is on the top of the page, e.g. in Page Break Preview? Thank you. -- Andrei. |
All times are GMT +1. The time now is 01:21 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com