+ Reply to Thread
Results 1 to 11 of 11

Unable to run macro on every dropdown item

  1. #1
    Registered User
    Join Date
    09-09-2012
    Location
    mumbai
    MS-Off Ver
    Excel 2010
    Posts
    6

    Unable to run macro on every dropdown item

    Hi

    I want that a message box should appear on selecting each item from the dropdown list. However, not able to do so. Only one msgbox pops up when I hit delete across any cell in the sheet.

    Please find the code below:

    Please Login or Register  to view this content.

    Please suggest
    Last edited by arlu1201; 09-12-2012 at 11:28 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Unable to run macro on every dropdown item

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Unable to run macro on every dropdown item

    Try putting the code in the worksheet_selectionchange event.

  4. #4
    Registered User
    Join Date
    09-09-2012
    Location
    mumbai
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Unable to run macro on every dropdown item

    Thanks for the code tagging.
    I tried worksheet_selectionchange event, however, now at every click of the mouse I get the msgbox "Hi there"
    Not what i desire

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Unable to run macro on every dropdown item

    Then you can specify the target cell like

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    09-09-2012
    Location
    mumbai
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Unable to run macro on every dropdown item

    sry its still not working....could be provide me the code
    pls

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Unable to run macro on every dropdown item

    Here it is
    Please Login or Register  to view this content.
    Sometimes you dont see the error till you test it.

  8. #8
    Registered User
    Join Date
    09-09-2012
    Location
    mumbai
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Unable to run macro on every dropdown item

    Its working fine now....Many thanks for ur help

  9. #9
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Unable to run macro on every dropdown item

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  10. #10
    Registered User
    Join Date
    09-09-2012
    Location
    mumbai
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Unable to run macro on every dropdown item

    Hi,

    I continuation with the above post, I have one more question. what if I want to prevent the same menu item being selected again such that the same macro is not run again....In short, I want to disable the dropdown menu item being selected again.

    Could you let me know a solution to that?

    Many thanks in advance..

  11. #11
    Registered User
    Join Date
    09-09-2012
    Location
    mumbai
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Unable to run macro on every dropdown item

    Hi,

    I continuation with the above post, I have one more question. what if I want to prevent the same menu item being selected again such that the same macro is not run again....In short, I want to disable the dropdown menu item being selected again.

    Could you let me know a solution to that?

    Many thanks in advance..

+ 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