View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Eric Howard Eric Howard is offline
external usenet poster
 
Posts: 4
Default 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!