Comparing Conditional Formatting in VBA
Hi Faraz,
Can't say I really understand what you are trying to achieve (or why for
that matter) but the following examples might help to point you in the right
direction.
Lookup FormatCondition Object in Help for more info.
Example 1
Sub ConditionalFormat()
With Sheets("Sheet1").Range("A1")
MsgBox .FormatConditions(1).Formula1
MsgBox .FormatConditions(1).Interior.Color
End With
End Sub
Example 2
Sub FormatConditLoop()
Dim objCondit As Object
'Loops through the conditions (that is condition 1,2 3 etc)
For Each objCondit In Sheets("Sheet1") _
.Range("A1").FormatConditions
MsgBox objCondit.Formula1
MsgBox objCondit.Interior.Color
Next
End Sub
--
Regards,
OssieMac
|