Solved

Modifying Conditional Format from VBA code

Posted on 2016-11-16
3
29 Views
Last Modified: 2016-11-18
I need to modify the Maximum Value for a Conditional format.

Edit Formatting Rule
How can I accomplish this within VBA code?
0
Comment
Question by:Terry Rogers
3 Comments
 
LVL 48

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 41890119
Hi,

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

Open in new window

Regards
0
 
LVL 31

Expert Comment

by:Rob Henson
ID: 41891084
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
 
LVL 1

Author Closing Comment

by:Terry Rogers
ID: 41892600
Thank you, this worked as expected. :)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now