View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
RitaG RitaG is offline
external usenet poster
 
Posts: 7
Default Changing Cell Font and Color Issue,

Thanks so much to all who responed!
I never realized that the color palette numbers for Excel are different,
hence 2 being white when I expected it to be navy. BTW, I used 25.
All's well that ends well...

"Peter T" wrote:


Another issue I have is trying to set a different cell to a certain color.
It's just not working. Here's the code (lLastColumn has a value of 33):
'*** Extend the Navy Blue color in row 2, last column created
wshFIC.Cells(2, lLastColumn).Select
Selection.Interior.ColorIndex = 2

Any suggestion will be greatly appreciated!



Hi Rita,

You have answers for your Font issue. And on to your blues.

Are you trying to fill with a dark blue, if so Colorindex 2 is white,
assuming you have a default / uncustomized palette.

Not sure what dark blue you want (11 ?) so pick from this:

Sub clrIndexes()
For i = 1 To 56
Cells(i, 1).Interior.ColorIndex = i
Cells(i, 2).Value = i
Next
End Sub

Index's 17 - 32 are the chart colours which you won't see on the drop down
palette of 40.

Regards,
Peter T