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

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,223,908
Messages
6,175,305
Members
452,633
Latest member
DougMo

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