This documentation is archived and is not being maintained.

DataSourceName Property

Office 2003

Returns or sets a String specifying the name of the ActiveX control that serves as the data source for the chart control. This property can be used in containers that support the Microsoft Internet Explorer Document Object Model. Read/write.


expression    Required. An expression that returns a ChartSpace object.


This example establishes PivotTable1 as the data source for Chartspace1 and then displays the field list so that the user can add data to the chart.

Sub ConnectChart()

   ' Bind ChartSpace1 to PivotTable1.
   Chartspace1.DataSourceName = "PivotTable1"

   ' Display the field list.
   Chartspace1.DisplayFieldList = True

End Sub