Excel page breaks

E

Eric Howard

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.
 
S

Sharad

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!
 
E

Eric Howard

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.
 

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.

Ask a Question

Top