Strolling Through the Color Palette
Sub ViewWorkbookColors()
Dim rg As Range
Dim nIndex As Integer
Set rg = ThisWorkbook.Worksheets("Sheet1").Range("A1:E5").Offset(1, 0)
For nIndex = 1 To 56
rg.Value = nIndex
rg.Offset(0, 1).Interior.ColorIndex = nIndex
rg.Offset(0, 2).Value = rg.Offset(0, 1).Interior.Color
Set rg = rg.Offset(1, 0)
Next
Set rg = Nothing
End Sub
Related examples in the same category