Hi Mark,
To see the help text about the possible colorconstants:
Copy this procedure to VBE
Sub AnOthorColor()
ActiveCell.Font.Color = vbGreen
End Sub
position your cursor over vbGreen in and hit [F1]
Greeting,
Wouter
Mark Tangard wrote in message ...
Hm. Actually it still doesn't come up in my VBA Help (XL 2000)....
These do work; but I was hoping to find the constants for all 40 of the
colors that can be applied to a cell interior from the toolbar dropdown.
Are these not all available as VBA constants?
TIA
--
Mark Tangard
"Life is nothing if you're not obsessed." --John Waters
Mark Tangard wrote:
Thank you Jim. Don't know why this never came up for me.
MT
Jim Cone wrote:
Mark,
From: Color Constants in Excel VBA help...
Constant Value
vbBlack 0x0
vbRed 0xFF
vbGreen 0xFF00
vbYellow 0xFFFF vbBlue 0xFF0000
vbMagenta 0xFF00FF
vbCyan 0xFFFF00
vbWhite 0xFFFFFF
Regards,
Jim Cone
San Francisco, CA
"Mark Tangard" wrote in message
...
Are there no color constants in Excel VBA for fonts, interior
shading, etc., other than the usual None and Auto? I don't see a
list in the Help, and I've tried all the usual xl- and vb- prefixed
combinations (separating prefix from color name with Color,
ColorIndex, or nothing). Does Excel not have the semi-English
constants like these in Word:
Selection.Font.Color = wdColorDarkBlue
Selection.Font.ColorIndex = wdDarkBlue
Selection.Cells(1).Shading.BackgroundPatternColor = wdColorDarkBlue
Selection.Cells(1).Shading.BackgroundPatternColorI ndex = wdDarkBlue
I was sure I'd seen them someplace but noooooo.....?
TIA
Mark Tangard, Microsoft Word MVP
"Life is nothing if you're not obsessed." --John Waters