Class ChartFormat (Excel VBA)

Provides access to the Office Art formatting for chart elements.

Item

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

Dim cft as ChartFormat
Set cft = ActiveChart.ChartArea.Format

The following procedures can be used to set variables of type ChartFormat: Axis.Format, AxisTitle.Format, ChartArea.Format, ChartTitle.Format, DataLabel.Format, DataLabels.Format, DataTable.Format, DisplayUnitLabel.Format, DownBars.Format, DropLines.Format, ErrorBars.Format, Floor.Format, Gridlines.Format, HiLoLines.Format, LeaderLines.Format, Legend.Format, LegendEntry.Format, LegendKey.Format, PlotArea.Format, Point.Format, Series.Format, SeriesLines.Format, TickLabels.Format, Trendline.Format, UpBars.Format and Walls.Format.

Adjustments

Returns an Adjustments object.

Dim adjsAdjustments As Adjustments
Set adjsAdjustments = ActiveChart.ChartArea.Format.Adjustments

AutoShapeType

Returns the type of the specified shape.

ActiveChart.ChartArea.Format.AutoShapeType =

Fill

Returns a FillFormat object for the parent chart element that contains fill formatting properties for the chart element.

Dim fftFill As FillFormat
Set fftFill = ActiveChart.ChartArea.Format.Fill

Glow

Returns a GlowFormat object for a specified chart that contains glow formatting properties for the chart element.

The glow effect adds a vibrant colored edge to graphics.

Dim gftGlow As Office.GlowFormat
Set gftGlow = ActiveChart.ChartArea.Format.Glow

Line

Returns a LineFormat object that contains line formatting properties for the specified chart element.

For a line, the LineFormat object represents the line itself; for a chart with a border, the LineFormat object represents the border.

Dim lftLine As LineFormat
Set lftLine = ActiveChart.ChartArea.Format.Line

PictureFormat

Returns a PictureFormat object for a specified chart that contains pictures.

Dim pftPictureFormat As PictureFormat
Set pftPictureFormat = ActiveChart.ChartArea.Format.PictureFormat

Shadow

Returns a ShadowFormat object that contains shadow formatting properties for the chart element.

Dim sftShadow As ShadowFormat
Set sftShadow = ActiveChart.ChartArea.Format.Shadow

SoftEdge

Returns a SoftEdgeFormat object for a specified chart that contains soft edge formatting properties for the chart.

Dim sefSoftEdge As Office.SoftEdgeFormat
Set sefSoftEdge = ActiveChart.ChartArea.Format.SoftEdge

TextFrame2

Returns a TextFrame2 object that contains text formatting for the specified chart element.

Dim tf2TextFrame2 As TextFrame2
Set tf2TextFrame2 = ActiveChart.ChartArea.Format.TextFrame2

ThreeD

Returns a ThreeDFormat object that contains 3D-effect formatting properties for the specified chart.

Dim tdfThreeD As ThreeDFormat
Set tdfThreeD = ActiveChart.ChartArea.Format.ThreeD