Share via


FormatConditions Interface

Represents the collection of conditional formats for a single range.

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

Syntax

'Declaration
<GuidAttribute("00024424-0000-0000-C000-000000000046")> _
<InterfaceTypeAttribute()> _
Public Interface FormatConditions _
    Inherits IEnumerable
'Usage
Dim instance As FormatConditions
[GuidAttribute("00024424-0000-0000-C000-000000000046")]
[InterfaceTypeAttribute()]
public interface FormatConditions : IEnumerable

Remarks

The FormatConditions collection can contain up to three conditional formats. Each format is represented by a FormatCondition object.

Use the FormatConditions property to return a FormatConditions object. Use the Add(XlFormatConditionType, Object, Object, Object) method to create a new conditional format, and use the Modify method to change an existing conditional format.

If you try to create more than three conditional formats for a single range, the Add method fails. If a range has three formats, you can use the Modify method to change one of the formats, or you can use the Delete method to delete a format and then use the Add method to create a new format.

For more information about conditional formats, see the FormatCondition object.

See Also

Reference

FormatConditions Members

Microsoft.Office.Interop.Excel Namespace