Skip to main content

Font.FontStyle property

Table of contents
  1. Syntax
  2. Remarks
  3. Example

Returns or sets the font style. Read/write String.

Syntax

expression.FontStyle

expression A variable that represents a Font object.

Remarks

Changing this property may affect other Font properties (such as Bold and Italic). Acceptable values are Regular, Italic, Bold, and Bold Italic.

Example

This example sets the font style for cell A1 on Sheet1 to bold and italic.

Worksheets("Sheet1").Range("A1").Font.FontStyle = "Bold Italic"

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>