![]() |
|
#1
|
||||
|
||||
|
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 |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Table styles - First column shading with bottom line on page break
|
NicB | Word Tables | 2 | 02-20-2019 03:05 AM |
| Paginate table so cell headings appear top of page instead bottom page when no room bottom page | mtcn | Word Tables | 5 | 12-11-2014 12:49 PM |
get rid of line above page numbers at bottom of pages.
|
Joanrichmond | Word | 1 | 02-11-2014 12:57 PM |
line and ?object at bottom of page in word 2007 doc
|
btdaniel | Word | 10 | 07-23-2012 03:03 AM |
Horizontal line at bottom and top each page
|
BrutalLogiC | Word | 1 | 07-03-2011 02:22 AM |