Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
What is the location of my first horizontal page break?
I have a macro that inserts lines to keep text together, so that a
paragraph does not get split between two pages. It works when I hard code the number of line per page, but I have the fit to one page wide property set, so that number changes. Is there a way I can find out what row contains the first horizonal page break? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
What is the location of my first horizontal page break?
Claud
More checking may be necessary to check you have one to avoid a 'subscript out of range error 9' Sub FindHPageBreak() Dim wks As Worksheet Dim lRow As Long Set wks = ActiveSheet lRow = wks.HPageBreaks(1).Location.Row End Sub -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England HIS "Claud Balls" wrote in message ... I have a macro that inserts lines to keep text together, so that a paragraph does not get split between two pages. It works when I hard code the number of line per page, but I have the fit to one page wide property set, so that number changes. Is there a way I can find out what row contains the first horizonal page break? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 Page Break Adjustments causes a page break each cell | Excel Worksheet Functions | |||
How do I do page breaks when view menu doesnt page break preview | Excel Discussion (Misc queries) | |||
change and/or remove page number watermark in page break preview | Excel Discussion (Misc queries) | |||
adding a new page break to an existing page break | Excel Discussion (Misc queries) | |||
lower horizontal page break will not move | Excel Discussion (Misc queries) |