Thread: Active cell
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Active cell

Yes 6 is a nice bright yellow.


In:

http://www.mvps.org/dmcritchie/excel/colors.htm

see the section:
ColorIndex -- 56 Excel Colors [#colors56/#colorindex]


for a complete list

--
Gary''s Student - gsnu200715


"village_idiot" wrote:

One more question, I take it that 6 is the color, is there a list of the
different colors and their numbers?

"Gary''s Student" wrote:

Use an event macro:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = xlNone
If Intersect(Target, Range("A1")) Is Nothing Then
Else
Range("D1:F3").Interior.ColorIndex = 6
End If

If Intersect(Target, Range("A2")) Is Nothing Then
Else
Range("D5:F7").Interior.ColorIndex = 6
End If

End Sub


This goes in Worksheet code, not a standard module.
--
Gary''s Student - gsnu200715