RGB Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.  

RGB property as it applies to the ChartColorFormat object.

Returns the red-green-blue value of the specified color. Read-only Long.

expression.RGB

expression   Required. An expression that returns one of the above objects.

 

RGB property as it applies to the ColorFormat object.

Returns or sets the red-green-blue value of the specified color. Read/write Long.

expression.RGB

expression   Required. An expression that returns one of the above objects.

 

Example

This example sets the interior color of the range A1:A10 to the chart area foreground fill color on chart one.

  Worksheets(1).Range("A1:A10").Interior.Color = _
    Charts(1).ChartArea.Fill.ForeColor.RGB