Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 08-16-2022, 01:14 PM
p45cal's Avatar
p45cal p45cal is offline Bottom Line in every page Windows 10 Bottom Line in every page Office 2019
Expert
 
Join Date: Apr 2014
Posts: 962
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Untested, try:
Code:
Sub BottomLine2()
Dim ws As Worksheet
Dim pb As HPageBreak
Dim LastRow As Long


For Each ws In ThisWorkbook.Worksheets
  origview = ActiveWindow.View
  ActiveWindow.View = xlPageBreakPreview

  For Each pb In ws.HPageBreaks
    LastRow = pb.Location.Offset(-1, 0).Row
    With ws.Range("B" & LastRow & ":H" & LastRow).Borders(xlEdgeBottom)
      .LineStyle = xlContinuous
      .Weight = xlThin
    End With
  Next pb
  ActiveWindow.View = origview
  'ws.DisplayPageBreaks = False
Next ws
End Sub
There's a commented out line you can add if you find you have unwanted pagebreaks showing.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bottom Line in every page 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
Bottom Line in every page get rid of line above page numbers at bottom of pages. Joanrichmond Word 1 02-11-2014 12:57 PM
Bottom Line in every page line and ?object at bottom of page in word 2007 doc btdaniel Word 10 07-23-2012 03:03 AM
Bottom Line in every page Horizontal line at bottom and top each page BrutalLogiC Word 1 07-03-2011 02:22 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:36 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft