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 said:
How do I use this property to find the address of automatic page breaks?
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.
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.