+ Reply to Thread
Results 1 to 11 of 11

Custom drop down with VBA

  1. #1
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Office 2010
    Posts
    164

    Custom drop down with VBA

    I have a drop down list that allows you to select a selection from a drop down list, then reselect it, and it will add a soft return and then add the new selection choice after the soft return. All the while inserting every choice from the drop down after a bullet point.
    The following is the code and it works great.
    HTML Code: 
    It also doesn't allow the same it to be repeated on the items from the list it creates. I need change this so that if an item is re-selected, it would change the text to say (Dismissed). Is that possible and does that make any sense?

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Custom drop down with VBA

    hi there, try if it helps

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Custom drop down with VBA

    result after selecting same option from the drop down listScreenshot_312.png

  4. #4
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Office 2010
    Posts
    164

    Re: Custom drop down with VBA

    I was just about to say "This is very close", then I read MY mistake from the original post. It meant to say "I need change this so that if an item is re-selected, it would change the text to say " (Dismissed)" at the end of the current selection. Like if a was selected from the drop down example "you graciously provided", after reselecting a it would say "a (Dismissed)".

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Custom drop down with VBA

    I updated the code with the following logic:

    a) if such item was previously selected - it adds " (Dismissed)" to the item
    b) if such item was previously selected and has " (Dismissed)" it turns to normal (without "Dismiss")

    That way you can reverse item status change

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Office 2010
    Posts
    164

    Re: Custom drop down with VBA

    All I have to say "Awesome"! I didn't even think about the option B, but that was perfect!!!

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Custom drop down with VBA

    if you are happy with the solution provided please mark the thread as Solved. How to do that: https://www.excelforum.com/faq.php

  8. #8
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Office 2010
    Posts
    164

    Re: Custom drop down with VBA

    I personally love this, and think it's much easier to read. But the attorney's I work for would like this in a comma separated cell instead of a bullet point type list. Here again, I have this code that works great, but I need to change the code to add the word "Dismissed" if re-selected, and then if re-selected again to remove " (Dismissed)" . I tried to revise the prior code several times to make it work, but I always messed it all up. I have this code, could anyone show me how to revise the following code so it would do the same thing as the code edited a few days ago by watersev.
    HTML Code: 
    Last edited by Delta729; 07-03-2018 at 08:06 PM.

  9. #9
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Office 2010
    Posts
    164

    Re: Custom drop down with VBA

    Does my post not make any sense, did I word this incorrectly? Can anybody help me out revising this code?
    Last edited by Delta729; 07-02-2018 at 08:03 PM.

  10. #10
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Office 2010
    Posts
    164

    Re: Custom drop down with VBA

    Okay, I think I might be getting close to what I trying to do. I have the attached file.

    On the defendants column, if the choice is selected with a new selection, it will add the new data with a comma in between. However, if you choose the same selection again, it won't do anything. It should do something like "Defendant Corp 2" and add the text " (Dismissed)". If selected again, it should remove the text " (Dismissed)". I attached a sample file, so if anybody that is good with VBA could help me out, it would be greatly appreciated. I removed the "Solved" status from this thread, or at least I tried to.

    If what I'm trying to do or my questions doesn't make any sense, please let me know. I could really use some help with this. I will post just the code in a follow up posting.
    Last edited by Delta729; 07-03-2018 at 08:13 PM.

  11. #11
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Office 2010
    Posts
    164

    Re: Custom drop down with VBA

    HTML Code: 

+ 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. [SOLVED] Custom Drop Down In Ribbon
    By guitarsweety in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-01-2017, 10:58 AM
  2. Custom Drop Down List
    By juanp21 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-22-2015, 10:30 AM
  3. Custom Drop-Down List
    By jacqlee in forum Excel General
    Replies: 1
    Last Post: 02-11-2008, 04:30 PM
  4. Filter from custom drop down list
    By freebrownies in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-25-2007, 04:31 PM
  5. Custom drop lines
    By AJO in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-22-2007, 09:41 PM
  6. Custom Drop Down Lists
    By samprince in forum Excel General
    Replies: 2
    Last Post: 07-21-2006, 04:45 PM
  7. [SOLVED] Custom drop down menus
    By SDeVuyst in forum Excel General
    Replies: 1
    Last Post: 06-25-2005, 09:05 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