Class ChartBorder (PowerPoint VBA)

The class ChartBorder represents the border of an object. 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

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.

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 return 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

Weight

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


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