Name Property

       

Returns or sets the name of the specified object.

expression.Name

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

Example

This example sets the name of the specified chart.

ChartSpace1.Charts(0).Name = "Line Chart"

After the chart name has been set, you can refer to the chart by name, as shown in the following example.

ChartSpace1.Charts("Line Chart").HasLegend = True