Font Method
Sets the font for the text in the active cells.
Syntax
expression**.Font(Name, Size, Bold, Italic, Underline, Color, Reset)**
*expression * Optional. An expression that returns an Application object.
Name Optional String. The name of the font.
Size Optional Integer. The size of the font in points.
Bold Optional Boolean. True if the font is bold.
Italic Optional Boolean. True if the font is italic.
Underline Optional Boolean. True if the font is underlined.
PjColor
pjColorAutomatic | pjNavy |
pjAqua | pjOlive |
pjBlack | pjPurple |
pjBlue | pjRed |
pjFuchsia | pjSilver |
pjGray | pjTeal |
pjGreen | pjYellow |
pjLime | pjWhite |
pjMaroon |
Reset Optional Boolean. True if the font is reset to its default characteristics. All other arguments are ignored. The default value is False.
Example
The following example formats selected text using 16-point Tahoma.
Sub FormatTahoma16()
Font Name:="Tahoma", Size:=16, Bold:=False, Italic:=False, Underline:=False, Color:=pjBlack
End Sub
Applies to | Application Object
See Also | FontBold Method | FontItalic Method | FontUnderline Method | FormatCopy Method | FormatPaste Method | TextStyles Method