Application.Font Method
Project Developer Reference |
Sets the font for the text in the active cells.
Syntax
expression.Font(Name, Size, Bold, Italic, Underline, Color, Reset, CellColor, Pattern)
expression A variable that represents an Application object.
Parameters
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. |
Underline | Optional | Boolean | True if the font is underlined. |
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 | NOT available at this time. |
Pattern | Optional | Variant | NOT available at this time. |
Return Value
Boolean
Remarks
Example
The following example formats selected text using 16-point Tahoma.
Visual Basic for Applications |
---|
|
See Also