How to cycle through borders in Excel and change their color?
问题 I am trying to cycle through active borders in Excel and to change their colors to "next one". Here is the code I have: Dim Color1 As Variant Dim Color2 As Variant Dim Color3 As Variant Dim Color4 As Variant Dim Color5 As Variant Color_default = RGB(0, 0, 0) Color1 = RGB(255, 0, 0) Color2 = RGB(0, 255, 0) Color3 = RGB(0, 0, 255) Color4 = RGB(222, 111, 155) Color5 = RGB(111, 111, 111) Dim cell As Range Dim positions As Variant Dim i As Integer positions = Array(xlDiagonalDown, xlDiagonalDown,