Underline Property

Microsoft Office Web Components Visual Basic

and PivotFont objects; read/write Variant for the Font object (returns Null if the characters in the font do not all have the same underline style; otherwise, returns one of the UnderlineStyleEnum constants). Use the IsNull function to determine whether the return value is Null.

expression.Underline

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This example adds a single underline to all cell values in row 1.

Sub FormatFont()

   Dim ssConstants

   Set ssConstants = Spreadsheet1.Constants

   Spreadsheet1.Rows(1).Font.Underline = ssConstants.owcUnderlineStyleSingle

End Sub