Results 1 to 13 of 13

Userform with Cascading Combo Boxes Based on Dynamic Named Ranges...

Threaded View

  1. #1
    Registered User
    Join Date
    11-22-2019
    Location
    Victoria, Canada
    MS-Off Ver
    Office 365
    Posts
    6

    Userform with Cascading Combo Boxes Based on Dynamic Named Ranges...

    Hello Everyone,

    This is my first time posting here, so right off I'd like to say thank you for all of the great questions and answers here that have helped me so much already. I'm quite new to VBA, so this has been a lifeline for me.

    I am creating a template workbook with many tables which contain multiple dependent dropdown lists. These cascades appear to be working just fine in the tables via data validation using the INDIRECT function.

    My challenge has been to create this same functionality in the userforms.

    I have found several examples of code for similar situations to mine, but each one is just unique enough that I’m not able to recognize how to make it work for my particular use (yes, very new to VBA).

    The Context:

    To keep it simple, here are just some basic details for one of the tables…

    I’ll call this the MAIN table, and it has 3 columns: 1. “Type” 2. “Subtype” 3. “Item”

    1. The “Type” column has a drop-down list in it based on a single-column dynamic named range which is stored on a different sheet in the workbook.

    2. The “Subtype” column is dependent on the user’s drop-down list choice in the “Type” column and it draws on dynamic named ranges with names that exactly match the options in the “Type” column list. (These ranges are also housed on that other worksheet.)

    3. Similarly, the “Item” column is dependent on the user’s drop-down list choice in the “Subtype” column and draws on dynamic named ranges with names that exactly match the options in the “Subtype” column lists.

    So all named ranges are dynamic, single-column, and are stored on a sheet named “DropDownLists”. (The ranges are directly based on named tables.)

    The Userform:

    1. The “Type” field is a combo box that has already been coded to show all items in the named range called “rgeMAINItemType”. That seems to be working fine.
    Name: cboTypeMAIN

    2. The “Subtype” field is a combo box that SHOULD BE populated by the range whose name matches the selection the user enters into cboTypeMAIN.
    Name: cboSubtypeMAIN

    3. The “Item” field is a combo box that SHOULD BE populated by the range whose name matches the selection the user enters into cboSubtypeMAIN.
    Name: cboItemMAIN

    I won’t post any of the code I have been trying, in order to not confuse the matter here. Also, I realize that there might be potentials for errors that one should address within the coding that I am just not aware of...

    If anyone is able to assist me with a solution, it would be very greatly appreciated. (I have been working on this without success for a very long time!)

    (Simple workbook example attached.)

    Thank you very much!!
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Dynamic Ranges for Combo Boxes
    By BONCH in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-19-2017, 07:16 PM
  2. [SOLVED] Draw line from named ranges based on userform combo box
    By Purgatorium in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-01-2016, 08:04 PM
  3. Replies: 3
    Last Post: 07-28-2014, 03:16 PM
  4. Replies: 5
    Last Post: 07-28-2014, 11:53 AM
  5. Cascading combo box and dynamic ranges
    By penfold1992 in forum Excel General
    Replies: 2
    Last Post: 08-24-2013, 06:33 AM
  6. [SOLVED] Adding dynamic named ranges to combo boxes in userform
    By Spritz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-04-2013, 09:45 AM
  7. [SOLVED] Cascading Comboboxes With Multiple Dynamic Named Ranges?
    By spamad in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-20-2013, 10:52 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