Name Property

Microsoft Office Web Components Visual Basic

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

    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