This documentation is archived and is not being maintained.

Name Property

Office 2003

Returns or sets the name of the specified object.

  • Read/write Variant for the Font object.

  • Read/write for the Range object. Returns a Name object. Set using a String.

  • 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.

Remarks

Only one case for PivotField.Name is read/write. The special read/write case is for the calculated field of the PivotField object.

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
		




Show: