VBA--改变Tab的颜色 (18种颜色走马灯)
2020-09-21 本文已影响0人
萍水相逢1979
Public Sub Colr()
If testing Then Exit Sub
If ActiveSheet.Tab.ColorIndex >= 18 Or ActiveSheet.Tab.ColorIndex < 1 Then
ActiveSheet.Tab.ColorIndex = 1
Else
ActiveSheet.Tab.ColorIndex = CInt(ActiveSheet.Tab.ColorIndex + 1)
End If
End Sub