Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Font.ColorIndex
Does anyone know why
debug.print Worksheets("Sheet").Range("C955").Font.ColorIndex sometimes returns a negative 4 digit number (e.g. -4105) when it should return something else entirely, like a 7? Thanks - Kirk |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Font.ColorIndex
Hi,
It will return that if the colorindex is xlautomatic Try this Range("a1").Font.ColorIndex = xlAutomatic Debug.Print Worksheets("Sheet").Range("a1").Font.ColorIndex Mike "kirkm" wrote: Does anyone know why debug.print Worksheets("Sheet").Range("C955").Font.ColorIndex sometimes returns a negative 4 digit number (e.g. -4105) when it should return something else entirely, like a 7? Thanks - Kirk |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Font.ColorIndex
On Fri, 6 Feb 2009 00:39:02 -0800, Mike H
wrote: Hi, It will return that if the colorindex is xlautomatic Try this Range("a1").Font.ColorIndex = xlAutomatic Debug.Print Worksheets("Sheet").Range("a1").Font.ColorIndex Thanks Mike. I found that first line turns the text to black and -4105 is the result. Does this mean if you set it to NOT xlAutomtatic it will return (what seems) the right number ? How would you make it so, and does this also change the text colour? I'd rather just detect the colour, not alter it. Cheers - Kirk |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
.Font.ColorIndex Delay Question | Excel Programming | |||
Can't set font.colorindex from VBA | Excel Programming | |||
VBA Error setting Font.ColorIndex | Excel Programming | |||
If Font.ColorIndex = 5 then . . . | Excel Programming | |||
Font and Fill ColorIndex | Excel Programming |