Color Index Number

  • Thread starter Thread starter Roger R
  • Start date Start date
R

Roger R

Where would I find all of the numbers associated with the
colors to use while writeing VBA?
 
Look for ColorIndex property in VBA Help

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Roger

Sub ListColorIndexes()
Dim Ndx As Long
Sheets.Add
For Ndx = 1 To 56
Cells(Ndx, 1).Interior.ColorIndex = Ndx
Cells(Ndx, 2).Value = Hex(ThisWorkbook.Colors(Ndx))
Cells(Ndx, 3).Value = Ndx
Next Ndx
End Sub

Also see David McRitchie's site for more on the color palette

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

Gord Dibben Excel MVP
 
Back
Top