Forcing a Border at the Page Break

mmarzouk

New Member
Joined
Sep 22, 2014
Messages
15
Hi,

I am trying to have the last row in each print page have a xlmedium border line. When I look at the print preview, there is not border. Below is my latest attempt to add the border, I loop through every single column and add a border (Cell below PBreak and Cell above PBreak). I have merged cells above the PBreaks and below the PBreaks but none of them intersect the page breaks.

Any idea what could be the issue. Is there a setting that prevents having borders?



Code:
    For CouNter = 1 To LaSt_Col        With WS.Range(Cells(PbLoc - 1, CouNter), Cells(PbLoc - 1, CouNter)).Borders(xlEdgeBottom)
            .LineStyle = xlContinuous
            .Weight = xlMedium
            .Color = RGB(0, 0, 0)
        End With
        
        With WS.Range(Cells(PbLoc, CouNter), Cells(PbLoc, CouNter)).Borders(xlEdgeTop)
            .LineStyle = xlContinuous
            .Weight = xlMedium
            .Color = RGB(0, 0, 0)
        End With
    Next CouNter

Excel 2010

Regards,
Mahmoud
 
Last edited:

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
And just to add to issue above. After the macro runs, I go manually remove the added border and then re-add it, it prints just fine. So I have no clue what I am missing here.
 
Upvote 0

Forum statistics

Threads
1,215,352
Messages
6,124,449
Members
449,160
Latest member
nikijon

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top