Sub ShowPageBreaksAndRemoveManuals()
Dim oHPgbr As HPageBreak
Dim oVPgbr As VPageBreak
For Each oHPgbr In ActiveSheet.HPageBreaks
If oHPgbr.Location.EntireRow.PageBreak = xlPageBreakManual Then
MsgBox "Manual row page break at:" &
oHPgbr.Location.Address
oHPgbr.Location.EntireRow.PageBreak = xlPageBreakNone
Else
MsgBox "Other row page break at:" & oHPgbr.Location.Address
End If
Next
For Each oVPgbr In ActiveSheet.VPageBreaks
If oVPgbr.Location.EntireColumn.PageBreak = xlPageBreakManual
Then
MsgBox "Manual Column page break at:" &
oVPgbr.Location.Address
oVPgbr.Location.EntireColumn.PageBreak = xlPageBreakNone
Else
MsgBox "Other Column page break at:" &
oVPgbr.Location.Address
End If
Next
End Sub
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.