Modifying Conditional Format from VBA code

I need to modify the Maximum Value for a Conditional format.

Edit Formatting Rule
How can I accomplish this within VBA code?
LVL 1
Terry RogersIT Senior EngineerAsked:
Who is Participating?
 
Rgonzo1971Commented:
Hi,

pls try
Sub macro3()
    Range("I3").FormatConditions(1).MaxPoint.Modify newtype:=xlConditionValueNumber, newvalue:=100
End Sub

Open in new window

Regards
0
 
Rob HensonFinance AnalystCommented:
Rather than modifying to a specific number, modify it to refer to a cell. You can then just adjust the value in the cell when you need to modify the value.
0
 
Terry RogersIT Senior EngineerAuthor Commented:
Thank you, this worked as expected. :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.