_Workbook.Colors Property

Returns or sets colors in the palette for the workbook. The palette has 56 entries, each represented by an RGB value. Read/write Object.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Property Colors ( _
    Index As Object _
) As Object
    Get
    Set
'Usage
Dim instance As _Workbook
Dim Index As Object
Dim value As Object

value = instance.Colors(Index)

instance.Colors(Index) = value
Object this[
    Object Index
] { get; set; }

Parameters

  • Index
    Type: System.Object

    Optional Object. The color number (from 1 to 56). If this argument isn’t specified, this method returns an array that contains all 56 of the colors in the palette.

Property Value

Type: System.Object

See Also

Reference

_Workbook Interface

_Workbook Members

Microsoft.Office.Interop.Excel Namespace