ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel page breaks (https://www.excelbanter.com/excel-programming/318696-excel-page-breaks.html)

Eric Howard

Excel page breaks
 
I have the need to place a graphic in the center of each page on an Excel
worksheet. The problem I am running up against it finding ALL of the page
breaks. If the data on the spreadsheet is only one page. there are no page
breaks define through HPageBreaks or VPageBreaks. Is there a way to determine
where these page breaks occur?

Thanks in advance.
--
Eric Howard
Director of Process Automation
Synergis Technologies, Inc.

Sharad

Excel page breaks
 
Hi Eric,

to see where default pagebreaks occur for a sheet, in excel click on
View menu select 'Page Break View' then again go back to normal view
(again View menu - Normal).
It will now display both H & V pagebreaks.

Another way, just insert and run below macro to see pagebreaks in all
the sheets of the workbook:

Sub viewPbreaks()
For Each sh In ThisWorkbook.Sheets
sh.ResetAllPageBreaks
Next sh
End Sub


Sharad


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Eric Howard

Excel page breaks
 
Thanks. However I need to determine their location programatically. I realize
I didn't specify that. I don't care of the page breaks are displayed. My
ultimate goal is to determine the center of page so I can programatically
place the graphic.

"Sharad" wrote:

Hi Eric,

to see where default pagebreaks occur for a sheet, in excel click on
View menu select 'Page Break View' then again go back to normal view
(again View menu - Normal).
It will now display both H & V pagebreaks.

Another way, just insert and run below macro to see pagebreaks in all
the sheets of the workbook:

Sub viewPbreaks()
For Each sh In ThisWorkbook.Sheets
sh.ResetAllPageBreaks
Next sh
End Sub


Sharad


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



All times are GMT +1. The time now is 03:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com