I am trying to set page breaks at specific points through the code and I used this
Code: Select all
sh.Range("A" & sh.Cells(Rows.Count, 2).End(xlUp).Row + 1).PageBreak = xlPageBreakManual
Code: Select all
With sh.Range("A9:G" & Rows.Count)
.UnMerge: .ClearContents: .Borders.Value = 0
.Parent.ResetAllPageBreaks
End With
Any ideas?