The
conditional formatting feature allows you to apply formats to a cell or range of cells, and have that formatting change depending on the value of the cell or the value of a formula.
Use the
Add method to add new ConditionalFormat objects. Use the
Item property
to access a ConditionalFormat object. The ConditionalFormat object supports
the following properties and method:
| | Name | Description | |
| | ApplyTo | Specifies whether the format is applied to items or columns. | |
| | ApplyToBars | Specifies the list of bars that the current format is applied to. The list includes the name of the bars separated by comma character. | |
| | BackColor | Retrieves or sets the background color for objects that match the condition. | |
| | BarColor | Specifies the color to be applied to bars if the conditional expression is accomplished. | |
| | BarOverviewColor | Specifies the color to be applied to bars, in the overview portion of the control, if the conditional expression is accomplished. | |
| | Bold | Bolds the objects that match the condition. | |
| | ClearBackColor | Clears the background color. | |
| | ClearBarColor | Clears the bar's color. | |
| | ClearBarOverviewColor | Clears the bar's overview color. | |
| | ClearForeColor | Clears the foreground color. | |
| | Enabled | Specifies whether the condition is enabled or disabled. | |
| | Expression | Indicates the expression being used in the conditional format. | |
| | Font | Retrieves or sets the font for objects that match the criteria. | |
| | ForeColor | Retrieves or sets the foreground color for objects that match the condition. | |
| | Italic | Specifies whether the objects that match the condition should appear in italic. | |
| | Key | Checks whether the expression is syntactically correct. | |
| | StrikeOut | Specifies whether the objects that match the condition should appear in strikeout. | |
| | Underline | Underlines the objects that match the condition. | |
| | Valid | Checks whether the expression is syntactically correct. | |