Returns or sets the name of the specified object.
Read/write Variant for the Font object.
Read/write Name object for the Range object.
Read/write String for the ChAxis, ChChart, ChFont, ChSeries, GroupingDef, Name, PageField, PivotFont, PivotHyperlink, PivotTotal, RecordsetDef, SchemaField, SchemaRowsource, and Worksheet objects.
Read-only String for all other objects in the Applies To list.
expression.Name
expression Required. An expression that returns one of the objects in the Applies To list.
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