title | keywords | f1_keywords | ms.service | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|---|
Application.FontEx method (Project) |
vbapj.chm937 |
|
project-server |
|
4904d4b1-dacb-8020-0c4e-3af0503c68ba |
06/08/2017 |
medium |
Sets the font for the text in the active cells.
expression. FontEx
( _Name_
, _Size_
, _Bold_
, _Italic_
, _Underline_
, _Color_
, _Reset_
, _CellColor_
, _Pattern_
)
expression A variable that represents an Application object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Name | Optional | String | The name of the font. |
Size | Optional | Integer | The size of the font in points. |
Bold | Optional | Variant | True if the font is bold. |
Italic | Optional | Boolean | True if the font is italic; otherwise, False. |
Underline | Optional | Boolean | True if the font is underlined; otherwise, False. |
Color | Optional | Long | The color of the font. Can be one of the PjColor constants. |
Reset | Optional | Boolean | True if the font is reset to its default characteristics. All other arguments are ignored. The default value is False. |
CellColor | Optional | Variant | The color of the cell. Can be one of the PjColor constants. |
Pattern | Optional | Variant | Background pattern of the cell. Can be one of the PjFillPattern constants. |
Boolean
To set the font with an RGB hexadecimal value for color or with a strikethrough format, use the Font32Ex method.
The following example formats selected text using 16-point Tahoma in a red color.
Sub FormatTahoma16()
FontEx Name:="Tahoma", Size:=16, Color:=pjRed
End Sub
[!includeSupport and feedback]