+ Reply to Thread
Results 1 to 5 of 5

Activate a macro by cell selection within range

  1. #1
    Registered User
    Join Date
    02-21-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    3

    Activate a macro by cell selection within range

    Hello All,

    I would like to run a macro as soon as a cell is clicked on. This cell can be in a specified range for example if any cell in Column C is clicked on the macro should run. How do I do this?

    Thanks!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,940

    Re: Activate a macro by cell selection within range

    Perhaps something like this:

    http://stackoverflow.com/questions/1...k-in-excel-vba
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    02-21-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    3

    Re: Activate a macro by cell selection within range

    Quote Originally Posted by alansidman View Post
    I'm not sure how to use this.

    Currently:

    Please Login or Register  to view this content.
    So that talks C5, instead of all the column C
    Last edited by alansidman; 02-21-2017 at 07:35 PM.

  4. #4
    Registered User
    Join Date
    02-21-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    3

    Re: Activate a macro by cell selection within range

    Found something that works:
    Please Login or Register  to view this content.
    Last edited by alansidman; 02-21-2017 at 07:35 PM.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,940

    Re: Activate a macro by cell selection within range

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)

+ 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. UserForm ComboBox selection to activate WorkSheet selection row.
    By excelV3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-24-2015, 12:35 PM
  2. Use Cell Value to Activate Named Range
    By countingbackwards in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-28-2014, 01:03 PM
  3. [SOLVED] Cell selection or activate
    By grkchakri in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-13-2014, 01:09 AM
  4. [SOLVED] Input box: can't figure out how to activate that selection for hte rest of the macro
    By charles1394 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-24-2013, 11:04 PM
  5. [SOLVED] Activate last Cell in Filtered Range
    By carlosriver24 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-25-2012, 09:22 PM
  6. How to activate a specific cell within a range
    By Eduard in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2008, 03:31 AM
  7. Replies: 5
    Last Post: 06-05-2007, 10:06 AM

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