Microsoft KB Archive/141785

= Can't Set ColorIndex Property of Style Class =

Article ID: 141785

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft Excel 5.0 Standard Edition

-



This article was previously published under Q141785



SYMPTOMS
In Microsoft Excel, when you use Visual Basic for Applications and you attempt to set the color for the font of the default style, the color will always be set to shadow as in the following example: ActiveWorkbook.Styles("Test").Font.ColorIndex = 1



WORKAROUND
Set the ColorIndex property to xlAutomatic. All other values will create a shadow, but they will not set the color of the font.



STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Excel for Windows version 5.0c.

Additional query words: XL5

Keywords: kbprogramming KB141785

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.