View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
xlmate[_2_] xlmate[_2_] is offline
external usenet poster
 
Posts: 21
Default Interior Cell Color Numbers

Excel Help doesn't provide this, 40 color palette is on a toolbar icon, and
56 color palette is available with Format, Cells, Patterns(tab)

run this macro to generate 56 colors and its related constants on a worksheet

Sub ColorValue()

Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Add()
Set objWorksheet = objWorkbook.Worksheets(1)

For i = 1 To 14
objExcel.Cells(i, 1).Value = i
objExcel.Cells(i, 2).Interior.ColorIndex = i
Next

For i = 15 To 28
objExcel.Cells(i - 14, 3).Value = i
objExcel.Cells(i - 14, 4).Interior.ColorIndex = i
Next

For i = 29 To 42
objExcel.Cells(i - 28, 5).Value = i
objExcel.Cells(i - 28, 6).Interior.ColorIndex = i
Next

For i = 43 To 56
objExcel.Cells(i - 42, 7).Value = i
objExcel.Cells(i - 42, 8).Interior.ColorIndex = i
Next

End Sub

Hope this help. Pls click Yes if this help

cheers

"Mike" wrote:

Can someone tell me where i can find the Interior Cell Color Numbers for
2003?