Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Q about font color
How do I retrieve a fonts color? Do I access the color index number or is
there a text value that is a property of the font color? TIA. -gk- -- ================================================= The creative act is not the province of remote oracles or rarefied geniuses but a transparent process that is open to everyone. -Greg Kot in Wilco Learning How To Die- |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Q about font color
Each colour has it's own value.
eg this makes the selected cell(S) green. Yellow is 6 and red is 3. With Selection.Interior .ColorIndex = 4 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With BOL DavidC -----Original Message----- How do I retrieve a fonts color? Do I access the color index number or is there a text value that is a property of the font color? TIA. -gk- -- =============================================== == The creative act is not the province of remote oracles or rarefied geniuses but a transparent process that is open to everyone. -Greg Kot in Wilco Learning How To Die- . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Q about font color
I have no problem setting font properties. I need to access font properties
without changing them For instance, cell A1 contains a text value. I want something like: MsgBox Range("A1").Font.ColorIndex -OR- a = Selection.Font.ColorIndex Of course, these don't work. -gk- "DavidC" wrote in message ... Each colour has it's own value. eg this makes the selected cell(S) green. Yellow is 6 and red is 3. With Selection.Interior .ColorIndex = 4 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With BOL DavidC -----Original Message----- How do I retrieve a fonts color? Do I access the color index number or is there a text value that is a property of the font color? TIA. -gk- -- =============================================== == The creative act is not the province of remote oracles or rarefied geniuses but a transparent process that is open to everyone. -Greg Kot in Wilco Learning How To Die- . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Q about font color
What "doesn't work" about your statements?
Either will return 1 of the 56 colorindex values, or xlColorIndexAutomatic (-4105). Note if the selection contains more than one cell with different font colors, Selection.Font.ColorIndex returns Null. In article , "38N90W" wrote: I have no problem setting font properties. I need to access font properties without changing them For instance, cell A1 contains a text value. I want something like: MsgBox Range("A1").Font.ColorIndex -OR- a = Selection.Font.ColorIndex Of course, these don't work. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Q about font color
Hi,
I think MsgBox Range("A1").Font.ColorIndex works. Try next procedure. Sub test_colorindex() For i = 0 To 56 With Range("A1").Offset(i) .Value = i .Font.ColorIndex = i .Offset(, 1).Value = .Font.ColorIndex End With Next i End Sub Jare -- Message posted from http://www.ExcelForum.com |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Q about font color
"JE McGimpsey" wrote in message ... What "doesn't work" about your statements? Either will return 1 of the 56 colorindex values, or xlColorIndexAutomatic (-4105). Note if the selection contains more than one cell with different font colors, Selection.Font.ColorIndex returns Null. A Ha! My text in question had different colors, which I hadn't noticed (long story but a good reason for that). Seems my problem just a got a bit more complex. Thanks! -gk- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional Format for font color using font color | Excel Worksheet Functions | |||
Changing Font color based on font type or size | Excel Discussion (Misc queries) | |||
fill color and font color icons do not work in excel | Excel Discussion (Misc queries) | |||
How to change the default Border, Font Color, and Cell Color | Excel Discussion (Misc queries) | |||
My fill color and font color do not work in Excel Std Edition 2003 | Excel Discussion (Misc queries) |