HotXLS Docs

ColorIndex property

Returns or sets the colour of the border. The colour is specified as an index value into the current colour palette, or as one of the following XlColorIndex constants. Read/write LongWord.

Syntax

property ColorIndex: LongWord;

Description

ColorIndex can be one of these XlColorIndex constants.
xlColorIndexAutomatic Use to specify the automatic border colour
xlColorIndexNone Use to specify no border colour

Example

This example sets the colour of the top edge border of A1:D1 range.

Workbook.Sheets[1].Range['A1', 'D1'].Borders[xlEdgeTop].ColorIndex := 5;