Sub to list colorindexes and the corresponding fill colours
Hi Max,
By fill colour, do you mean the RGB equivalent?
Public Sub Colours()
Dim i As Long
Dim tmp, tRed, tBlue, tGreen
For i = 1 To 56
Cells(i, "A").Value = i
Cells(i, "C").Interior.ColorIndex = i
tmp = GetRGB(ActiveWorkbook.Colors(i), tRed, tGreen, tBlue)
Cells(i, "B").Value = "RGB(" & tRed & ", " & tGreen & ", " & tBlue &
")"
Next i
Columns("B:B").AutoFit
End Sub
--
HTH
Bob Phillips
"Max" wrote in message
...
Hi guys,
(Apologies for the earlier post w/o any subject line)
I'm looking for a sub which can list all the colorindexes down say col A,
and all the corresponding fill colors in col B ?
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
|