+ Reply to Thread
Results 1 to 9 of 9

Excel VBA: Multi-level dependant lists ComboBoxes. some problem in extracting unique lists

  1. #1
    Registered User
    Join Date
    07-23-2021
    Location
    Pakistan
    MS-Off Ver
    2019
    Posts
    8

    Question Excel VBA: Multi-level dependant lists ComboBoxes. some problem in extracting unique lists

    i have a file containing the sample userform of 3 sample combo boxes every next combobox is dependant to the previous.

    there is a simple vba behind it, which i think should work correctly.

    Please Login or Register  to view this content.
    it does work for starting items but not for further. the issue is in
    Please Login or Register  to view this content.
    as well as in
    Please Login or Register  to view this content.
    when it try to get unique items for combobox list.

    any solution please.

    Comment: The query is also posted by me in MrExcel forum.
    Attached Files Attached Files
    Last edited by talha.ansari; 07-24-2021 at 06:02 AM.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    20,138

    Re: Excel VBA: Multi-level dependant lists ComboBoxes. some problem in extracting unique l

    Delete current code and paste the following code.
    Please Login or Register  to view this content.

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,613

    Re: Excel VBA: Multi-level dependant lists ComboBoxes. some problem in extracting unique l

    Cross posted
    https://www.mrexcel.com/board/thread...lists.1177309/

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Registered User
    Join Date
    07-23-2021
    Location
    Pakistan
    MS-Off Ver
    2019
    Posts
    8

    Re: Excel VBA: Multi-level dependant lists ComboBoxes. some problem in extracting unique l

    Quote Originally Posted by jindon View Post
    Delete current code and paste the following code.
    Please Login or Register  to view this content.
    Thankyou for your kind solution. one more question please.

    can we get A-Z sorted list with this method?

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    20,138

    Re: Excel VBA: Multi-level dependant lists ComboBoxes. some problem in extracting unique l

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    07-23-2021
    Location
    Pakistan
    MS-Off Ver
    2019
    Posts
    8

    Re: Excel VBA: Multi-level dependant lists ComboBoxes. some problem in extracting unique l

    Quote Originally Posted by jindon View Post
    Please Login or Register  to view this content.
    thankyou, sort goes correctly but there is a little issue still present. on top of dropdown list i found a blank row. any way to remove that blank row?

    for a temp patch i am using
    Please Login or Register  to view this content.
    iAgentName is Combobox1 in this case

    is that ok or should do with some other better way?
    Last edited by talha.ansari; 07-26-2021 at 01:34 PM.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    20,138

    Re: Excel VBA: Multi-level dependant lists ComboBoxes. some problem in extracting unique l

    Try change the part in Initialize event code
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    If this doesn't work, I need to see your workbook.

  8. #8
    Registered User
    Join Date
    07-23-2021
    Location
    Pakistan
    MS-Off Ver
    2019
    Posts
    8

    Re: Excel VBA: Multi-level dependant lists ComboBoxes. some problem in extracting unique l

    it worked. thank you!!!
    Last edited by AliGW; 07-27-2021 at 10:40 AM. Reason: PLEASE don't quote unnecessarily!

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
    Posts
    61,986

    Re: Excel VBA: Multi-level dependant lists ComboBoxes. some problem in extracting unique l

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

    Also, 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.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" to anyone who has offered you help in your thread. You can reward them by clicking on * Add Reputation below theur user name on the left, if you wish.


    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.

+ 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: 3
    Last Post: 06-04-2020, 06:12 PM
  2. [SOLVED] creating unique items lists for comboboxes... need a better way
    By Arnold Layne in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 03-13-2019, 11:09 AM
  3. [SOLVED] Multi Level Dependent Drop Down Lists
    By mysticmoron109 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-03-2015, 03:35 PM
  4. [SOLVED] Drop Lists - Dependant and returning Unique values only
    By marsofearth in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-04-2015, 04:38 PM
  5. Multiple Dependant Dropdown lists - need to show unique values only please
    By parsonsamie in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-27-2014, 07:04 PM
  6. Multi-level Data Validation with Lists
    By saschagraef in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 12-16-2010, 08:49 AM
  7. Multi-level dependent lists
    By aussiemate in forum Excel General
    Replies: 6
    Last Post: 02-25-2010, 04:02 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