View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Doug Glancy Doug Glancy is offline
external usenet poster
 
Posts: 770
Default Color index values

Hari,

You can run this in an empty worksheet:

Sub test()

Dim i As Double

i = 0
On Error Resume Next
ActiveSheet.Cells.Clear

While Err = 0
i = i + 1
ActiveSheet.Cells(i, 1) = i
ActiveSheet.Cells(i, 2).Interior.ColorIndex = i
Wend

ActiveSheet.Cells(i, 1).Clear

End Sub

hth,

Doug Glancy

"Hari" wrote in message
...
Hi,

In VB I want to use the fill color option based on certain conditions.

I know that yellow has a color index value 6.

I want to know where I can find a glossary for all the color index values.

Please tell me the source for the same. I searched in MS VB help but

couldnt
find the same.

Regards,
Hari
India