Border Property

Applies To

Arc Object, Arcs Collection, Axis Object, AxisTitle Object, ChartArea Object, ChartObject Object, ChartObjects Collection, ChartTitle Object, CheckBox Object, DataLabel Object, DataLabels Collection, DownBars Object, Drawing Object, DrawingObjects Collection, Drawings Collection, DropLines Object, ErrorBars Object, Floor Object, Gridlines Object, GroupObject Object, GroupObjects Collection, HiLoLines Object, Legend Object, LegendKey Object, Line Object, Lines Collection, OLEObject Object, OLEObjects Collection, OptionButton Object, OptionButtons Collection, Oval Object, Ovals Collection, Picture Object, Pictures Collection, PlotArea Object, Point Object, Rectangle Object, Rectangles Collection, Series Object, SeriesLines Object, TextBox Object, TextBoxes Collection, Trendline Object, UpBars Object, Walls Object.

Description

Accessor. Returns a Border object that represents the border of the object. Read-only.

Example

This example sets the color of the chart area border of Chart1 to red.


Charts("Chart1").ChartArea.Border.ColorIndex = 3

This example creates a new rectangle on Sheet1 and then sets the border color to red.


Set newRect = Worksheets("Sheet1").Rectangles.Add(72, 72, 72, 144)
newRect.Border.ColorIndex = 3