Results 1 to 2 of 2

Cascading Combobox - unlimited range in frst box

Threaded View

  1. #1
    Registered User
    Join Date
    07-29-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    1

    Cascading Combobox - unlimited range in frst box

    Please help me find a solution to this problem. I have searched SEVERAL forums, and couldn’t find anything that helps in this case

    I must use a Userform, so data validation does not apply to this problem.

    I have 5 comboboxes.

    Combobox 2-5 is dependent on the choice made in Combobox 1.

    Now, the problem lies in this:

    Combobox 1 has a list that continuously grows and thus the normal cascade code like the one below does not really work because I can’t just hardcode every single choice for Combobox1.

       If ComboBox1 = "XXXX" Then
        	ComboBox2.AddItem "XXXX1"    
    ComboBox2.AddItem "XXXX2"   
    ComboBox2.AddItem "XXXX3"

    Also, Combobox 1 normally has choices that are made of several words and not just one.

    Basically, imagine having a mail-merge document made of a spreadsheet with contacts from hundreds of companies. In one column the company name is repeated many times as there are several contacts in each company.

    The Userform uses this sheet as its source.

    Combobox 1 could determines the Company
    Combobox 2 could determine which Contacts there are in this company
    Combobox 3-5 could determine the region etc. depending on the choices made above.

    Any solution would be greatly appreciated.
    Last edited by royUK; 07-29-2009 at 01:08 PM. Reason: add code tags

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