+ Reply to Thread
Results 1 to 7 of 7

Trigger a macro when selection made

  1. #1
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    596

    Trigger a macro when selection made

    I have a cell which is "data validated" for a list.
    I want to trigger a macro when I make a selection of the validated data, in other words, run a macro when selection done in the dropdown cell.
    Any good ideas?
    Thanks

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,901

    Re: Trigger a macro when selection made

    You will need a worksheet change event.

    http://www.ozgrid.com/VBA/run-macros-change.htm
    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
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    596

    Re: Trigger a macro when selection made

    I tried that, but I can not find the option for "making selection"; there are options for CALCULATE, ACTIVATE,CHANGE etc., but none of these works for a dropdown selection within a validated cell. Am I doing something wrong?
    Thanks

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,901

    Re: Trigger a macro when selection made

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  5. #5
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    596

    Re: Trigger a macro when selection made

    Attached, please find the file; when you open it, you will see a green cell which contains "ORANGE"; that cell is a DATA VALIDATED CELL.What I am trying to achieve is that the moment I make a selection in that green cell, I want to trigger a macro; for now if I could get a MsgBox "Macro Triggered", it would be good enough; I could take it from there.
    Thank you very much for the quick response!
    Attached Files Attached Files

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,901

    Re: Trigger a macro when selection made

    Put this in the worksheet events

    Please Login or Register  to view this content.
    See attached
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    596

    Re: Trigger a macro when selection made

    Amazing! It works perfect.
    Thank you very much.

+ 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. Replies: 1
    Last Post: 03-27-2013, 07:04 AM
  2. Macro Runs Selection is Made from Validation List
    By jadown in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-08-2011, 03:18 PM
  3. Macro to confirm that a drop down selection has been made
    By prontrad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-31-2010, 12:57 PM
  4. Macro to run once list box selection made
    By ChrisMattock in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2007, 04:04 AM
  5. Having A Macro Run When A Selection Is Made In A List Box
    By Compnerd in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-05-2005, 05:07 PM

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