Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I use this property to find the address of automatic page breaks? Excel VBA help doesn't do a great job explaining this one
-Kerry |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Kerry,
Sub test() Dim hpb As HPageBreak For Each hpb In Sheet1.HPageBreaks If hpb.Type = xlPageBreakAutomatic Then Debug.Print "Automatic: " & hpb.Location.Address ElseIf hpb.Type = xlPageBreakManual Then Debug.Print "Manual: " & hpb.Location.Address End If Next End Sub Rob "Kerry" wrote in message ... How do I use this property to find the address of automatic page breaks? Excel VBA help doesn't do a great job explaining this one. -Kerry |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Kerry,
The Location property of the H/VPageBreak objects returns a Range object reference to the location of the page break. From that, you can use the Address property to get the address. The range returned by Location is immediately below the page break. Debug.Print ActiveSheet.HPageBreaks(1).Location.Address -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Kerry" wrote in message ... How do I use this property to find the address of automatic page breaks? Excel VBA help doesn't do a great job explaining this one. -Kerry |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Forecasting Property Tax | Excel Discussion (Misc queries) | |||
Caption Property | Excel Discussion (Misc queries) | |||
Precedents Property | Excel Programming | |||
VBA: using ignoreblank property | Excel Programming | |||
IndicatorColorIndex Property | Excel Programming |