Hello all,
Since 3 hours I am trying to do a small macro that will add a page break after every 48th row and a border after the last row in page, but it seems that it just doesn't work...
I also tried to add the page break manually (macro recorder)
ActiveSheet.ResetAllPageBreaks
Set ActiveSheet.HPageBreaks(1).location = Range("A48")
Set ActiveSheet.HPageBreaks(2).location = Range("A96")
Set ActiveSheet.HPageBreaks(3).location = Range("A144")
but since my number of pages are not always the same, it gives me an error when the range with data is shorter then the row number on vba...
Any chance you can help?
Bookmarks