Share via


Phonetics.Length Property

Excel Developer Reference

Returns a Long value that represents the number of characters of phonetic text from the position you've specified with the Start property.

Syntax

expression.Length

expression   A variable that represents a Phonetics object.

Example

This example returns the length of the second phonetic text string in the active cell.

Visual Basic for Applications
  ActiveCell.FormulaR1C1 = "toukyoutotoukyoutotoukyoutoshibuyakushibuyakushibuyakuyoyogiyoyogiyoyogi"
ActiveCell.Phonetics.Add Start:=1, Length:=3, Text:="toukyouto toukyoutotoukyouto toukyoutotoukyoutotoukyouto"
ActiveCell.Phonetics.Add Start:=4, Length:=3, Text:="shibuyaku shibuyakushibuyaku"
MsgBox ActiveCell.Phonetics(2).Length

See Also