Hi. I found in another site a code that draws a bottom line at every page of a data sheet. I would prefer that the vba need not show a print preview and the bottom line should be drawn from col B to F.
Thank you for all the help, past and present.
Code:
Sub BottomLine()
Dim ws As Worksheet
Dim pb As HPageBreak
Dim LastRow As Long
For Each ws In ThisWorkbook.Worksheets
ActiveWindow.View = xlPageBreakPreview
For Each pb In ws.HPageBreaks
LastRow = pb.Location.Offset(-1, 0).Row
With ws.Rows(LastRow).Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
End With
Next pb
Next ws
End Sub