Separator Property [Excel 2003 VBA Language Reference]

Sets or returns a Variant representing the separator used for the data labels on a chart. Read/write.

expression.Separator

expression Required. An expression that returns one of the objects in the Applies To list.

Remarks

When a value of "1" is returned, it indicates that the user has not changed the default separator which is a comma ",". You can also pass a value of "1" to change the separator back to the default separator.

The chart must first be active before you can access the data labels programmatically; otherwise a run-time error occurs.

Example

This example sets the data label separator for the first series on the first chart to a semicolon. This example assumes a chart exists on the active worksheet.

Sub ChangeSeparator()

    ActiveSheet.ChartObjects(1).Chart.SeriesCollection(1) _
        .DataLabels.Separator = ";"

End Sub

Applies to | DataLabel Object | DataLabels Collection Object