Public Sub ApplyBackgroundColor()
Dim x As Variant
x = ActiveCell.Interior.Color
With Selection.borders
.LineStyle = xlContinuous
.Weight = xlThin
.Color = x
End With
Selection.Interior.Color = x
End Sub
Sub ClearAllBorder()
Dim colorVal as Variant
colorVal = Selection.Cells(1,1).Interior.Color
With Selection.borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.Color = colorVal
End With
With Selection.borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.Color = colorVal
End With
With Selection.borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.Color = colorVal
End With
With Selection.borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.Color = colorVal
End With
With Selection.borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.Color = colorVal
End With
With Selection.borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.Color = colorVal
End With
End Sub