Class Font (Excel VBA)
Contains the font attributes (font name, font size, color, and so on) for an object.
The classes AboveAverage, CellFormat, Characters, DataTable, DisplayFormat, FormatCondition, LegendEntry, Phonetic, Range, Style, TableStyleElement, TickLabels, Top10 and UniqueValues ... give access to class Font
.
Dim fnt as Font
Set fnt = ActiveCell.Font
Properties
Background returns or sets the type of background for text used in charts. Read/write Variant, which is set to one of the constants of XlBackground.
Bold true if the font is bold.
Color returns or sets the primary color of the object, as shown in the table in the remarks section. Use the RGB function to create a color value.
ColorIndex returns or sets a value that represents the color of the font.
FontStyle returns or sets the font style. Read/write String.
Italic true if the font style is italic. Read/write Boolean.
Name returns or sets a Variant value that represents the name of the string.
Size returns or sets the size of the font.
Strikethrough true if the font is struck through with a horizontal line. Read/write Boolean.
Subscript true if the font is formatted as subscript. False by default.
Superscript true if the font is formatted as superscript; False by default.
ThemeColor returns or sets the theme color in the applied color scheme that is associated with the specified object.
ThemeFont returns or sets the theme font in the applied font scheme that is associated with the specified object.
TintAndShade returns or sets a Single that lightens or darkens a color.
Underline returns or sets the type of underline applied to the font.