Class ChartBorder (PowerPoint VBA)

The class ChartBorder represents the border of an object.

Set

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

Dim cbr as ChartBorder
Set cbr = ActiveWindow.RangeFromPoint.Chart.DataTable.Border

The following procedures can be used to set variables of type ChartBorder: Axis.Border, DataTable.Border, DropLines.Border, ErrorBars.Border, Gridlines.Border, HiLoLines.Border, LeaderLines.Border, SeriesLines.Border and Trendline.Border

Color

Returns or sets the primary color of the object.

ActiveWindow.RangeFromPoint.Chart.DataTable.Border.Color =

ColorIndex

Returns or sets the color of the border.

Possible Values are xlColorIndexAutomatic - Automatic color, xlColorIndexNone - No color.

The color is specified as an index value into the current color palette, or as one of the following XlColorIndex constants:

ActivePresentation.Slides(1).Shapes(1).Chart.DataTable.Border.ColorIndex = 5

LineStyle

Returns or sets the line style for the border. Read/write XlLineStyle, xlGray25, xlGray50, xlGray75, or xlAutomatic.

Possible Values are xlContinuous - A continuous line, xlDash - A dashed line, xlDashDot - Alternating dashes and dots, xlDashDotDot - A dash followed by two dots, xlDot - A dotted line, xlDouble - A double line, xlLineStyleNone - No line, xlSlantDashDot - Slanted dashes.

The xlDouble and xlSlantDashDot constants of the xlLineStyle enumeration do not apply to charts.

ActivePresentation.Slides(1).Shapes(1).Chart.DataTable.Border.LineStyle = xl3DBar

Parent

Returns the parent for the specified object. Read-only object.

Weight

Returns or sets the weight of the border. Read/write XlBorderWeight.

ActivePresentation.Slides(1).Shapes(1).Chart.DataTable.Border.Weight =2