+ Reply to Thread
Results 1 to 5 of 5

macro to trigger Cond Formatting when just CLICK on any cell in a range

  1. #1
    Forum Contributor
    Join Date
    10-08-2019
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    326

    macro to trigger Cond Formatting when just CLICK on any cell in a range

    Hi

    i'm trying to write a macro that will trigger the Conditional Formatting when I just CLICK on any cell within the specified range, but it doesn't seem to be working. Can anyone who knows where I'm wrong/inadequate point me in the right way here..?


    Please Login or Register  to view this content.

    cheers
    Stewart
    Last edited by Pepe Le Mokko; 03-20-2020 at 05:53 AM. Reason: Code tags

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: macro to trigger Cond Formatting when just CLICK on any cell in a range

    Worksheet_Change() doesn't get triggered when you click on a cell - you'll need to use Worksheet_SelectionChange() event.

    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,449

    Re: macro to trigger Cond Formatting when just CLICK on any cell in a range

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    I did it for you this time. Please read forum rules. Thanks

  4. #4
    Forum Contributor
    Join Date
    10-08-2019
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    326

    Re: macro to trigger Cond Formatting when just CLICK on any cell in a range

    Quote Originally Posted by WideBoyDixon View Post
    Worksheet_Change() doesn't get triggered when you click on a cell - you'll need to use Worksheet_SelectionChange() event.

    WBD
    Super thanks WBD!

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,449

    Re: macro to trigger Cond Formatting when just CLICK on any cell in a range

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Adjust a code from cell range trigger to button trigger
    By ld2x07 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-01-2014, 10:02 AM
  2. [SOLVED] Double click cell to trigger a Copy Macro
    By mjfox52610 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-10-2013, 02:15 PM
  3. [SOLVED] Trigger macro on click
    By ikavellari in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-05-2013, 08:12 AM
  4. [SOLVED] Cond. formatting a column/Range, highlight cell in column/range if equal to specific text
    By DFrank231 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-19-2013, 03:35 PM
  5. Can't get command button click to trigger cell population
    By clcs in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-25-2010, 01:43 AM
  6. click into a cell to trigger an event
    By DDR2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-01-2008, 09:48 AM
  7. Replies: 9
    Last Post: 10-17-2005, 09:05 AM

Tags for this Thread

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