Class Characters (Excel VBA)

The class Characters represents characters in an object that contains text.


To use a Characters class variable it first needs to be instantiated, for example

Dim chrs as Characters
Set chrs = ActiveCell.Characters

The following procedures can be used to set variables of type Characters: AxisTitle.Characters, ChartTitle.Characters, DataLabel.Characters, DisplayFormat.Characters, DisplayUnitLabel.Characters, Range.Characters and TextFrame.Characters


Returns a String value that represents the text of this range of characters.

ActiveCell.Characters.Caption =


Returns a Long value that represents the number of objects in the collection.

Dim lngCount As Long
lngCount = ActiveCell.Characters.Count


Deletes the object.



Returns a Font object that represents the font of the specified object.

Dim fntFont As Font
Set fntFont = ActiveCell.Characters.Font


Inserts a string preceding the selected characters.

Insert (String)

String: The string to insert.

Dim strString As String: strString = 
ActiveCell.Characters.Insert String:=strString


Returns the parent object for the specified object. Read-only.


Returns or sets the phonetic text in the specified Characters object.

Instead of using this property, you should use the Add method of the Phonetics collection to add phonetic information to a cell, and use the Text property of the Phonetic object to return or set the phonetic text strings in a cell.

ActiveCell.Characters(1,3).PhoneticCharacters = "フリガナ"


Returns or sets the text for the specified object.

ActiveCell.Characters.Text =