See
http://tinyurl.com/8h9lw, Peter and I cover most there.
Your code should look like
Cells.Interior.Colorindex = xlCILight Orange
although your case statement looks odd to me, so perhaps it should say
Select Case D1(i)
Case xlCILight Orange
grpsize(i) = 6
etc.
--
HTH
Bob Phillips
(remove nothere from the email address if mailing direct)
"tandavina" wrote
in message ...
How/Where do I get the color index?
I used the names of the colors:
Code:
--------------------
For i = 1 To grpnr
Select Case D1(i)
Case Cells.Interior("Light Orange")
grpsize(i) = 6
Case Cells.Interior("Aqua")
grpsize(i) = 4
Case Cells.Interior("Plum")
grpsize(i) = 3
Case Cells.Interior("Rose")
grpsize(i) = 2
Case Else
MsgBox "error in grouping color"
End Select
Next i
--------------------
only to return error.
--
tandavina
------------------------------------------------------------------------
tandavina's Profile:
http://www.excelforum.com/member.php...o&userid=30334
View this thread: http://www.excelforum.com/showthread...hreadid=511457