Font and Fill ColorIndex

  • Thread starter Thread starter Frank
  • Start date Start date
F

Frank

I want to set the font color index of a cell
to 'automatic' and the fill color to 'no fill'.

I don't see the index number in the color chart in Excel's
help.

What are the Color Index #s for 'automatic' font and 'no
fill'

Thanks for your help
 
From VBA Help (Colorindex):
Font The color of the font. Specify xlColorIndexAutomatic to use the
automatic color.

Interior The color of the interior fill. Set this property to
xlColorIndexNone to specify that you don't want an interior fill.
 
Hi Frank,

You could record a macro to see what it does...I did it and you get a value
of xlAutomatic and xlNone. These correspond to numeric values of -4105
and -4142 respectively.

Hope this helps,
Daniel

Excel Tips and Tricks - www.danielklann.com
 
With ActiveCell
.Interior.ColorIndex = xlNone
.Font.ColorIndex = xlAutomatic
End With

type colorindex in your module, highlight it an hit F1. This has that
information.

turn on the macro recorder and make those changes manually - then turn it
off and look at the code - another way.
 
Back
Top