Text property (Excel Graph)

Returns or sets the text for the specified object. Read/write String.

Syntax

expression.Text

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

Example

This example sets the text for the title of the chart.

With myChart 
 .HasTitle = True 
 .ChartTitle.Text = "First Quarter Sales" 
End With

This example sets the axis title text for the category axis.

With myChart.Axes(xlCategory) 
 .HasTitle = True 
 .AxisTitle.Text = "Month" 
End With

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.