Class DataTable (Excel VBA)

The class DataTable represents a chart data table.

Item

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

Dim dte as DataTable
Set dte = ActiveChart.DataTable

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

Border

Returns a Border object that represents the border of the object.

Dim brdBorder As Border
Set brdBorder = ActiveChart.DataTable.Border

Delete

Deletes the object.

ActiveChart.DataTable.Delete

Font

Returns a Font object that represents the font of the specified object.

Dim fntFont As Font
Set fntFont = ActiveChart.DataTable.Font

Format

Returns the ChartFormat object.

Dim cftFormatted As ChartFormat
Set cftFormatted = ActiveChart.DataTable.Format

HasBorderHorizontal

True if the chart data table has horizontal cell borders.

ActiveChart.DataTable.HasBorderHorizontal = True

HasBorderOutline

True if the chart data table has outline borders.

ActiveChart.DataTable.HasBorderOutline = True

HasBorderVertical

True if the chart data table has vertical cell borders.

ActiveChart.DataTable.HasBorderVertical = True

Select

Selects the object.

ActiveChart.DataTable.Select

ShowLegendKey

True if the data label legend key is visible.

ActiveChart.DataTable.ShowLegendKey = True