Name

title.Characters

Synopsis

Returns the Characters object used to format the caption. For example, the following code adds a title to a chart and changes the font of the title:

Sub AddChartTitle( )
    Dim chrt As Chart, ct As ChartTitle
    Set chrt = ActiveChart
    ' Add a title.
    chrt.HasTitle = True
    ' Get the title
    Set ct = chrt.ChartTitle
    ' Set the text to display.
    ct.Caption = "FL Home Sales"
    ' Format the text.
    ct.Characters.Font.Size = 14
    ct.Characters.Font.Bold = True
End Sub

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.