This documentation is archived and is not being maintained.

_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

Dim _Workbook1 As _Workbook

Dim key As Object
Dim returnValue As Object
returnValue = _Workbook1.Colors(key)

Dim sampleValue As Object
_Workbook1.Colors(key) = sampleValue

object this[
	[In, Optional] object Index
] {get; set;}
public System.Object get_Item(
	/*in*/System.Object Index
public void set_Item(
	/*in*/System.Object Index
In JScript, you can use Indexed Properties defined by a class, but you cannot define your own.



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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms