NativeExcel2 for .Net Developer's Reference

IBorders.Color Property

Gets or sets the color of the borders.

[Visual Basic]
PropertyColorAsColor
[C#]
ColorColor{get;set;}
[C++]
__propertyColorget_Color();
__propertyvoidset_Color(Color);
[JScript]
functiongetColor():Color
functionsetColor(Color);

Property Value

The color of the specified borders.

Example

This example sets the color of the borders of A1:D1 range.

[C#]
book.Worksheets[1].Range["A1:D1"].Borders.Color = System.Drawing.Color.Red;
[VisualBasic]
book.Worksheets(1).Range("A1:D1").Borders.Color = System.Drawing.Color.Red
[C++]
IBorders* borders = book->Worksheets->Item[1]->Range->Item[S"A1:D1"]->Borders;
borders->Color = System::Drawing::Color::Red;

See Also

IBorders Interface | NativeExcel Namespace | IRange.Borders Property