This documentation is archived and is not being maintained.

ChDataLabel Object

Office 2003
Multiple objects
ChDataLabel
Multiple objects

Represents a single data label for a series, or the single data label for a trendline.

Using the ChDataLabel object

The following properties can be used to return a ChDataLabel object:

The ChDataLabels object's Item property

The ChTrendline object's DataLabel property

The following example adds data labels to the first series in the first chart in Chartspace1, and then formats the third data label.

Sub FormatSeriesLabel()

    Dim serSeries1
    Dim dlSeries1Labels

    ' Set a variable to the first series of the first chart
    ' in Chartspace1.
    Set serSeries1 = ChartSpace1.Charts(0).SeriesCollection(0)

    ' Add a set of data labels to the first series and return
    ' a DataLabels object.
    Set dlSeries1Labels = serSeries1.DataLabelsCollection.Add

    dlSeries1Labels.Item(2).Font.Bold = True
    dlSeries1Labels.Item(2).Font.Color = "Red"

End Sub
		


Methods | Select Method



Show: