+ Reply to Thread
Results 1 to 6 of 6

combo boxes options be linked to worksheet?

  1. #1
    Registered User
    Join Date
    06-26-2007
    Posts
    36

    combo boxes options be linked to worksheet?

    Hi,

    in my userform, there are a few combo boxes requiring the user to select from the selections. However, selection lists of some combo boxes depends on the selected option which user input previously.
    Eg.
    In the same userform, below are the fields:
    -Entity (combo boxes)
    -Division (combo boxes)
    -Section (combo boxes)

    However, it is only possible for the Division lists to be populated only when the user select one of the option from Entity. This is also similar for Section. Section list is populated when the user selects Entity and Division.

    Although i have only 3 Entites which i can hardcode but i have got 30 Divisions and 500 Sections. Is it possible to insert all these information of the entities, divisions and sections into a worksheet in the same workbook and linked it to the userform. I am not sure if this can be done in Excel as it is possible in Access (similar to a SQL statement). Such that when the user selects one entity, then under the division combo box, the program will find from the worksheet those divisions belonging to the entity chosen by user and are automatically loaded into the division combo box for the user to choose from. This process is then repeated for Section.

    Will appreciate any help and advise.

    Thank you

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    What you are chasing is dependent validation lists. There are many examples of how this can be performed.


    Here's a link to one

    dependent lists


    HTH

    rylo

  3. #3
    Registered User
    Join Date
    06-26-2007
    Posts
    36
    Hi,

    i saw the example and is just what i want. But my combo box is on a userform not the worksheet itself. Does it still works the same way? I am not very sure how i can put this method onto the combo boxes i have in the same userform

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    If you have a dynamic defined name covering the dependent list, then you can link the rowsource of the combobox on the form to that name.

    HTH

    rylo

  5. #5
    Registered User
    Join Date
    06-26-2007
    Posts
    36
    Hi,

    is there any example or any website etc which i can refer to so that i can have a better understanding on it.

    Thanks

  6. #6
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Have a look at the attached file.

    On the sheet is a dynamic name called myname. If you add extra entries to column A, the name will expand to cover them.

    The form only has a combobox, that has the defined name myname as the row source.

    Open the form, then look at the drop down options.

    Close the form, add some entries to column A, then reopen the form. The combobox will now show the new entries you have added.


    HTH

    rylo
    Attached Files Attached Files

+ 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