CellValueFontColor Property
Syntax
object.CellValueFontColor(Index)
Applies To
Discussion
Use this property to determine the font color for a row or column cell value, especially for a crosstab that uses multiple colors to highlight specific measures or categories. A report author may choose to apply different colors to each range in an exception definition.
Because the font color of cell values can vary throughout a report, you must specify an index to refer to a column or row cell.
This property applies to values only. Values can be measures or calculations.
An error occurs if the index reference for this property is out of bounds.
Valid font colors are
0 = Black
128 = Brown
32768 = Green
32896 = Olive
8388608 = Navy
8388736 = Purple
8421376 = Teal
8421504 = Gray
12632256 = Silver
255 = Red
65280 = Lime
65535 = Yellow
16711680 = Blue
16711935 = Fuschia
16776960= Aqua
16777215 = White
Default: 0 (black)
Parameters |
Description |
---|---|
Index |
Required. Specifies the row or column number of the cell. Use the row number when the property applies to a Column object. Use the column number when the property applies to a Row object. Type: Integer |
Type
Long
Access
Read
Example
This example returns the font color for the cell value in the second column, fourth row, and in the third column, third row.
Sub Main()
Dim objPPRep as Object
Set objPPRep = CreateObject ("CognosPowerPlay.Report")
objPPRep.Open "C:\Cubes and Reports\Sample1.ppx"
MsgBox "The font color for this cell value is " _
&objPPRep.Rows.Item(2).CellValueFontColor(4)
MsgBox "The font color for this cell value is " _
&objPPRep.Columns.Item(3).CellValueFontColor(3)
Set objPPRep = Nothing
End Sub