+ Reply to Thread
Results 1 to 6 of 6

UserForm: ComboBox #2 dependent on ComboBox #1

  1. #1
    Registered User
    Join Date
    02-24-2014
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    4

    UserForm: ComboBox #2 dependent on ComboBox #1

    Hello Excel Forum,

    I am a new user and looking for some much needed assistance.

    Background:

    I have two lists. The first ComboBox contains three departments: Department 1, Department 2, and Department 3.
    The second ComboBox should contain ALL pumps located in "Selected Department" (each Department has a different list of pumps).

    The list of pumps are located on a separate Sheet. Thus, I need to call the entire pump list into the second ComboBox, which is dependent on either Department 1, 2, or 3.

    Goal:

    In very simplistic form, it should look like this.

    If the Value of ComboBox1 = Department 1,
    Then the Value of ComboBox 2 = PumpListA.

    If the Value of ComboBox1 = Department 2,
    Then the Value of ComboBox 2 = PumpListB.

    If the Value of ComboBox1 = Department 3,
    Then the Value of ComboBox 2 = PumpListC.



    I hope this is sufficient background information.

    Thank You!

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: UserForm: ComboBox #2 dependent on ComboBox #1

    Where are comboboxes - on sheet or userform? If they are on sheet, what kind of combobox is it - data validation, Forms or ActiveX?
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  3. #3
    Registered User
    Join Date
    02-24-2014
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: UserForm: ComboBox #2 dependent on ComboBox #1

    I have created the ComboBoxes using UserForm VBA (Capture1.PNG).

    To initiate the Userform, I created a Initilizer CommandButton on the starting interface sheet (Capture2.PNG).
    Attached Images Attached Images

  4. #4
    Registered User
    Join Date
    02-24-2014
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: UserForm: ComboBox #2 dependent on ComboBox #1


  5. #5
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: UserForm: ComboBox #2 dependent on ComboBox #1

    Code will be like:
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    02-24-2014
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: UserForm: ComboBox #2 dependent on ComboBox #1

    That works great!

    Thank You!

  7. #7
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: UserForm: ComboBox #2 dependent on ComboBox #1

    You are welcome.

    Please remember to select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. VBA code error for userform dependent combobox
    By Jonno1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-29-2014, 01:35 PM
  2. [SOLVED] Userform with two combobox dependent on one combobox
    By bigfoot007 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-10-2012, 01:01 PM
  3. VBA Userform Dependent Combobox
    By TextMonkey in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-10-2011, 06:46 AM
  4. Dependent Combobox in Excel Userform
    By 2Deep in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-07-2010, 08:59 AM
  5. userform one combobox dependent on another
    By busydave in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-08-2010, 06: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