Syntax

expression.DataLabels(Index)

expression A variable that represents a Series object.

Parameters

Name Required/Optional Data Type Description
Index Optional Variant The number of the data label.

Return Value
Object

Remarks

If the series has the Show Value option turned on for the data labels, the returned collection can contain up to one label for each point. Data labels can be turned on or off for individual points in the series.

If the series is on an area chart and has the Show Label option turned on for the data labels, the returned collection contains only a single label, which is the label for the area series.

Example

This example sets the data labels for series one in Chart1 to show their key, assuming that their values are visible when the example runs.

Visual Basic for Applications
With Charts("Chart1").SeriesCollection(1) .HasDataLabels = True With .DataLabels .ShowLegendKey = True .Type = xlValue End With End With
Change one of the properties of all data labels? data data labels Data Labels Method DataLabel Method datalabels datalabels method Iterate through all datalabels? Manipulate a series datalabel?

See also: