Sub Change_Gridline_Color()
Dim Red As Integer, Green As Integer, Blue As Integer
Dim Color As Long
Red = Int((255 - 0 + 1) * Rnd + 0)
Green = Int((255 - 0 + 1) * Rnd + 0)
Blue = Int((255 - 0 + 1) * Rnd + 0)
Color = RGB(Red, Green, Blue)
With Selection
With .Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Color = Color
.Weight = xlThin
End With
With .Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Color = Color
.Weight = xlThin
End With
With .Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Color = Color
.Weight = xlThin
End With
With .Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Color = Color
.Weight = xlThin
End With
With .Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Color = Color
.Weight = xlThin
End With
With .Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Color = Color
.Weight = xlThin
End With
End With
End Sub