VBA - How to Clear ONLY bottom border of Rows in a range?

HDEmpsall

New Member
Joined
May 3, 2018
Messages
7
I can set a border with:

Dim rnge3 as Range
Dim rowstart as Integer, rowend as Integer

set rnge3 = Worksheets(3).Range("A" & rowstart & ":AU" & rowend)
With rnge3.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = 3
End With

But when I want to clear that border, using .LineStyle = .xlLineStyleNone fails, as does .xlNone.

I do NOT want to clear vertical borders, NOR ANY borders from the top (heading) rows of the sheet.
Many of my attempts fail to compile. The attempts that compile fail to work!
 
Yes - that's what I had thought you wanted, hence my confusion. :)
Yes. I apologise.
I had got fixated on the procedure to write the border. This is done when 1 record is written, so I want a bottom edge border then.
When the sheet is cleared I need to clear the borders from many individually-written records, so I need to get rid of the old borders before new are written. So for the border-cleanup I need all the horizontal lines.:cool:
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,094
Latest member
teemeren

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