do you mean this?
Sub test()
Dim rng As Range, sh As Worksheet, breaks_count As Long, i As Long
Set sh = ActiveSheet
sh.Range("a" & sh.ListObjects(1).ListRows.Count).Activate
breaks_count = sh.HPageBreaks.Count
For i = 1 To breaks_count
If rng Is Nothing Then Set rng = sh.Range("B" & sh.HPageBreaks(i).Location.Row - 1).Resize(, 7) Else Set rng = Union(sh.Range("B" & sh.HPageBreaks(i).Location.Row - 1).Resize(, 7), rng)
Next
If Not rng Is Nothing Then rng.Borders(xlEdgeBottom).LineStyle = xlContinuous
End Sub
Bookmarks