NativeExcel for .Net Developer's Reference

IBorders.Color Property

Gets or sets the color of the borders.

[Visual Basic]
Property Color As Color
[C#]
Color Color { get; set; }
[C++]
__property Color get_Color();
__property void set_Color(Color );
[JScript]
function get Color() : Color
function set Color(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;
[Visual Basic]
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