DataSourceName Property

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

*expression   * Required. An expression that returns a ChartSpace object.

Example

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

Applies to | ChartSpace Object | PivotTable Object

See Also | DataSource Property | SetData Method