XL5: Can't Set ColorIndex Property of Style Class

ID: Q141785

The information in this article applies to:

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.

Keywords          : xlwin 
Version           : 5.00
Platform          : WINDOWS

Last Reviewed: September 3, 1997