Skip to main content

Font.Underline property

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

Returns or sets the type of underline applied to the font. Read/write Variant.

Syntax

expression.Underline

expression A variable that represents a Font object.

Remarks

Can be one of the XlUnderlineStyle constants.

Example

This example sets the font in the active cell on Sheet1 to single underline.

Worksheets("Sheet1").Activate 
ActiveCell.Font.Underline = xlUnderlineStyleSingle

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>