Skip to content

Latest commit

 

History

History
56 lines (27 loc) · 1.46 KB

20f42207-4d50-1d9f-7dde-c01d7aef0abc.md

File metadata and controls

56 lines (27 loc) · 1.46 KB

TextFrame.Characters Method (Excel)

Returns a Characters object that represents a range of characters within a shape?s text frame. You can use the Characters object to add and format characters within the text frame.

Syntax

expression . Characters( Start , Length )

expression An expression that returns a TextFrame object.

Parameters

Name Required/Optional Data Type Description
Start Optional Variant The first character to be returned. If this argument is either set to 1 or omitted, the Characters method returns a range of characters starting with the first character.
Length Optional Variant The number of characters to be returned. If this argument is omitted, the Characters method returns the remainder of the string (everything after the character that was set as the Start argument).

Return Value

Characters

Remarks

The Characters object isn't a collection.

Example

This example formats as bold the third character in the first shape?s text frame on the active worksheet.

With ActiveSheet.Shapes(1).TextFrame 
 .Characters.Text = "abcdefg" 
 .Characters(3, 1).Font.Bold = True 
End With

See also

Concepts

TextFrame Object

Other resources

TextFrame Object Members