Class ChartData (PowerPoint VBA)

The class ChartData represents access to the linked or embedded data associated with a chart.


To use a ChartData class variable it first needs to be instantiated, for example

Dim cda as ChartData
Set cda = ActiveWindow.RangeFromPoint.Chart.ChartData

ChartData class variables can be set using the Chart.ChartData procedure.


Activates the first window of the workbook associated with the chart.

If the chart is linked to a Microsoft Excel workbook, this method does not run any Auto_Activate or Auto_Deactivate macros that might be attached to the workbook (use the RunAutoMacros method to run those macros).



Opens a Excel data grid window that contains the full source data for the specified chart.

If the data grid window is already open, this method has no effect. The ActivateChartDataWindow method differs from the ChartData.Activate method in that the former opens the chart in an Excel window within Word, with the Excel ribbon unavailable, whereas the latter opens a full version of Excel, with the ribbon available.



Removes the link between the data for a chart and a Microsoft Excel workbook.

Calling this method sets the IsLinked property of the ChartData object to False.



True if the data for the chart is linked to an external Microsoft Excel workbook.

Using the BreakLink method to remove the link to an Excel workbook sets this property to False.

Dim booIsLinked As Boolean
booIsLinked = ActivePresentation.Slides(1).Shapes(1).Chart.ChartData.IsLinked


Returns the workbook that contains the chart data associated with the chart.

Dim wbWorkbook As Workbook
wbWorkbook = ActivePresentation.Slides(1).Shapes(1).Chart.ChartData.Workbook