Martin_H
Board Regular
- Joined
- Aug 26, 2020
- Messages
- 190
- Office Version
- 365
- Platform
- Windows
Hi,
I would love to see this macro (see below) simplified as much as possible.
If anyone could look at it, I would be grateful.
Thank you.
I would love to see this macro (see below) simplified as much as possible.
If anyone could look at it, I would be grateful.
Thank you.
VBA Code:
Sub COLOR_BORDERS()
Range("AF14:AY14").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous: .Color = -1644826: .TintAndShade = 0: .Weight = xlMedium
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous: .Color = -1644826: .TintAndShade = 0: .Weight = xlMedium
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous: .Color = -1644826: .TintAndShade = 0: .Weight = xlMedium
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous: .Color = -1644826: .TintAndShade = 0: .Weight = xlMedium
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous: .Color = -1644826: .TintAndShade = 0: .Weight = xlMedium
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous: .Color = -1644826: .TintAndShade = 0: .Weight = xlMedium
End With
End Sub