Sub to list colorindexes and the corresponding fill colours
Thanks, Bob
Despite several tries at running your sub, I kept hitting:
Compile error: Sub or Function not defined
and "GetRGB" was highlighted in the line:
tmp = GetRGB(ActiveWorkbook.Colors(i), tRed, tGreen, tBlue)
What can I do ?
By fill colour, do you mean the RGB equivalent?
Actually, I'm afraid I don't know <g. Am new at this.
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Bob Phillips" wrote in message
...
Hi Max,
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
|