Hello,
I am using the below code to add a Single Line Border to the top of the ActiveCell and a Double Line border at the bottom.
Can the code be consolidated into fewer lines?
Also, I have searched and don't see if Excel 2007 has this option anywhere in the menus..is it out there?
-----------------------------------------------------
Sub Borders()
ActiveCell.Select
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlDouble
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThick
End With
End Sub
----------------------------------------------
Thanks
I am using the below code to add a Single Line Border to the top of the ActiveCell and a Double Line border at the bottom.
Can the code be consolidated into fewer lines?
Also, I have searched and don't see if Excel 2007 has this option anywhere in the menus..is it out there?
-----------------------------------------------------
Sub Borders()
ActiveCell.Select
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlDouble
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThick
End With
End Sub
----------------------------------------------
Thanks