Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default find pagebreak

Hi
How do I write code to find a pagebreak
Thanks
Tina
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 535
Default find pagebreak

Hi Tina,

How do I write code to find a pagebreak


This might give you an idea:

Sub ShowPageBreaksAndRemoveManuals()
Dim oHPgbr As HPageBreak
Dim oVPgbr As VPageBreak
For Each oHPgbr In ActiveSheet.HPageBreaks
If oHPgbr.Location.EntireRow.PageBreak = xlPageBreakManual Then
MsgBox "Manual row page break at:" &
oHPgbr.Location.Address
oHPgbr.Location.EntireRow.PageBreak = xlPageBreakNone
Else
MsgBox "Other row page break at:" & oHPgbr.Location.Address
End If
Next
For Each oVPgbr In ActiveSheet.VPageBreaks
If oVPgbr.Location.EntireColumn.PageBreak = xlPageBreakManual
Then
MsgBox "Manual Column page break at:" &
oVPgbr.Location.Address
oVPgbr.Location.EntireColumn.PageBreak = xlPageBreakNone
Else
MsgBox "Other Column page break at:" &
oVPgbr.Location.Address
End If
Next
End Sub

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help coding a PageBreak Marty Excel Discussion (Misc queries) 3 December 7th 07 01:33 PM
Cant move pagebreak in PageBreak View in Excel2003 Vasanthan Excel Worksheet Functions 1 August 22nd 07 03:28 PM
PageBreak-broke? nope Excel Programming 13 January 11th 05 03:54 PM
How to pagebreak Bilal A F Excel Programming 1 November 13th 03 06:57 PM
PAGEBREAK-MACRO Jay Dean Excel Programming 2 September 19th 03 12:40 PM


All times are GMT +1. The time now is 07:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"