Hi,
Thanks to PGC01 for the below code to show where page breaks are on a sheet. I was just looking to edit the code so that rather than the message box appearing it actually puts the text in the row itself. Something like "There is a page break on this row" in column A would do the trick I think.
Sub pagebreaklook()
Dim hpbs As HPageBreaks
Dim j As Long
Set hpbs = ActiveSheet.HPageBreaks
If hpbs.Count = 0 Then
MsgBox "No horizontal page breaks in active sheet"
Else
For j = 1 To hpbs.Count
MsgBox "Horizontal page break " & j & " at row: " & hpbs(j).Location.Row
Next j
End If
End Sub
Thanks to PGC01 for the below code to show where page breaks are on a sheet. I was just looking to edit the code so that rather than the message box appearing it actually puts the text in the row itself. Something like "There is a page break on this row" in column A would do the trick I think.
Sub pagebreaklook()
Dim hpbs As HPageBreaks
Dim j As Long
Set hpbs = ActiveSheet.HPageBreaks
If hpbs.Count = 0 Then
MsgBox "No horizontal page breaks in active sheet"
Else
For j = 1 To hpbs.Count
MsgBox "Horizontal page break " & j & " at row: " & hpbs(j).Location.Row
Next j
End If
End Sub