+ Reply to Thread
Results 1 to 6 of 6

Applying 'Live' conditional formatting within VBA code

  1. #1
    Registered User
    Join Date
    05-20-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    30

    Applying 'Live' conditional formatting within VBA code

    I've had to use some short VBA code in order to create more rules, but it will only update if i actually click on the cell, is there anyway to make this 'live' so when i add data it changes automatically;

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Applying 'Live' conditional formatting within VBA code

    You need to use the Worksheet_Change event. You currently have the code set to run under the Worksheet_SelectionChange event - which means the code only "fires" when you change from one cell to another within the intersecting range you have defined.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Registered User
    Join Date
    05-20-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Applying 'Live' conditional formatting within VBA code

    Hi Palmetto, thanks for the reply but I did try the change to 'change' but it doesn't even change colour not even when I click into the cell!!

    EDIT - Sorry I did forget to mention I'm working with Percentages, would this make a difference?
    Last edited by protocoledu; 11-17-2009 at 01:08 PM.

  4. #4
    Registered User
    Join Date
    05-20-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Applying 'Live' conditional formatting within VBA code

    Does anyone have any clues on this one at all??

  5. #5
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Applying 'Live' conditional formatting within VBA code

    Your code in the worksheet_change event works for me.

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    05-20-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Applying 'Live' conditional formatting within VBA code

    Palmetto, thanks for your help in this but it doesn't seem to like it when i put a simple % formula into the cell.

    I've attached what I mean!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1