View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Halim Halim is offline
external usenet poster
 
Posts: 182
Default ??? How to get list of Color constants

Hi,
Not sure but try this one
Sub Colorindexinterior()
For r = 0 To 56 'max is 56 as I know
Cells(r + 1, 1).Interior.ColorIndex = r
Cells(r + 1, 1).Offset(0, 1) = Cells(r + 1, 1).Interior.ColorIndex
Next
End Sub

I don't know if colorindex conts is available
--

Regards,

Halim


"Jaylin" wrote:

I have the following code with colorindx number 1 representing black color,

May I know how do I get the related color constatn list (ie what number =
what color) in VBA

With Selection.Interior
.ColorIndex = 1
End With

--
Thanks a million for your time and expert advice :-)
Jaylin
*****Jaylin Message ended*******