hi,
this does the trick
Sub SetPageBreaks() 'set horizontale pagebreaks
Dim PrintArea As String, LocArr As Variant, nmbPages As Long, I As Long, RowsPerPage As Long
RowsPerPage = 48 ' change to whatever you need
PrintArea = ActiveSheet.PageSetup.PrintArea
PrintArea = Replace(PrintArea, ":", "", , , vbBinaryCompare)
PrintArea = Mid(PrintArea, 2, Len(PrintArea) - 1)
LocArr = Split(PrintArea, "$", , vbBinaryCompare)
nmbPages = Application.WorksheetFunction.RoundUp((CDec(LocArr(3)) - CDec(LocArr(1))) / RowsPerPage, 0)
ActiveSheet.ResetAllPageBreaks
For I = 1 To nmbPages - 1
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveSheet.Range("A" & (CDec(LocArr(1)) + (RowsPerPage * I)))
Next I
End Sub
Select you print area and run the code
Bookmarks