I wonder if there is a way to only select page breaks which have been manually added while ignoring any automatically generated page breaks. that would be great.
concerning the "out of range" error, apparently it s a well known occurance and selecting/loading the end of the sheet fixes this but it s quite the makeshift solution i guess. is there a better way to deal with this?
concerning the "out of range" error, apparently it s a well known occurance and selecting/loading the end of the sheet fixes this but it s quite the makeshift solution i guess. is there a better way to deal with this?
VBA Code:
Sub hPage()
ActiveSheet.Cells(ActiveSheet.Rows.Count, Selection.Column).End(xlUp).Select 'error 9 fix
Dim hPage As HPageBreak
For Each hPage In ActiveSheet.HPageBreaks
hPage.Location.Select
Next hPage
End Sub