Name
pagebreak
.Location
Synopsis
Returns the Range
object indicating the location of the break. The following code displays the locations of manual page breaks in the Immediate window:
Sub ShowBreakLocations( ) Dim ws As Worksheet, hpb As HPageBreak Set ws = ActiveSheet For Each hpb In ws.HPageBreaks Debug.Print hpb.Location.Address Next End Sub
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.