+ Reply to Thread
Results 1 to 9 of 9

display relevant info in one combo box when selecting a value from another combo box

  1. #1
    Registered User
    Join Date
    12-29-2015
    Location
    Jeddah, Saudi Arabia
    MS-Off Ver
    2010
    Posts
    7

    display relevant info in one combo box when selecting a value from another combo box

    Hi there

    I am in need of some expertise. I have been working on this form project and need some help coding the combo boxes.


    I've been busy with the combo boxes in this particular project. Is there a way to populate a 2nd combo box with only relevant information? I am working with VB for this project.

    E.g I have a department combo box. When I select "IT", I want the employee combo box to only display all the "IT" personnel.
    Something along these lines:

    Please Login or Register  to view this content.
    An idea of what I want the action to perform. Now I am not quite sure how to implement all the coding. I have tried many options yet none work.

    Any and all help would be appreciated.
    Last edited by mailblade; 12-31-2015 at 03:52 AM. Reason: Formatting rules

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: display relevant info in one combo box when selecting a value from another combo box

    Are we talking about sheet based comboboxes or userform?
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    12-29-2015
    Location
    Jeddah, Saudi Arabia
    MS-Off Ver
    2010
    Posts
    7

    Re: display relevant info in one combo box when selecting a value from another combo box

    I am referring to userform comboboxes. I've been using vb mostly. The user must select the department which will auto-display relevant employees.

    Thank you for your reply.

  4. #4
    Registered User
    Join Date
    10-18-2015
    Location
    Lisbon, Portugal
    MS-Off Ver
    2010
    Posts
    38

    Re: display relevant info in one combo box when selecting a value from another combo box

    Greetings,

    How are you populating the comboboxes with the personnel?
    Straight from a "Excel DB Worksheet"? txt file? array?

    Regards,
    Daniel

  5. #5
    Registered User
    Join Date
    12-29-2015
    Location
    Jeddah, Saudi Arabia
    MS-Off Ver
    2010
    Posts
    7

    Re: display relevant info in one combo box when selecting a value from another combo box

    Good day,

    Yes it is from a Excel DB Worksheet. The one field/column has all the employee details while the other DB Worksheet contains all the Departments (only 5). I have linked each employee to their relevant departments. There are other fields such as Shift times but they are not relevant to the combo boxes since they are entered manually. The form design is just a bit of a hassle with regards to displaying the relevant employee information.

    Kind regards
    Last edited by mailblade; 12-31-2015 at 08:54 AM. Reason: grammar

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: display relevant info in one combo box when selecting a value from another combo box

    I created a sample for you

    Sheets(3) refers to the third sheet in the workbook, change that when you know your sheet names
    You can add as many departments as you want
    And as many entries as you want
    The code will adjust the userform automatically.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by mehmetcik; 12-31-2015 at 09:06 AM.

  7. #7
    Registered User
    Join Date
    12-29-2015
    Location
    Jeddah, Saudi Arabia
    MS-Off Ver
    2010
    Posts
    7

    Re: display relevant info in one combo box when selecting a value from another combo box

    This is a great example. It is exactly what I had in mind. I have already tested it and played around with it and it works!


    Thank you very much! I appreciate all your help immensely

  8. #8
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: display relevant info in one combo box when selecting a value from another combo box

    Please Mark as Solved.

    The tool is at the top

    Any reputation (*) points appreciated. None of us gets paid here.

    If you found someone's input useful, please take a second to click the * at the bottom left to let them know

  9. #9
    Registered User
    Join Date
    12-29-2015
    Location
    Jeddah, Saudi Arabia
    MS-Off Ver
    2010
    Posts
    7

    Re: display relevant info in one combo box when selecting a value from another combo box

    No problem, will do.

    Thank you again
    Cheers

+ 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: 8
    Last Post: 12-26-2013, 02:23 PM
  2. [SOLVED] Excel 2010 VBA – Combo Box Options– Clear cell/box in 2nd Combo when 1st Combo selected
    By theshybutterfly in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-17-2013, 07:25 PM
  3. combo box info going to two places
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-07-2013, 10:00 PM
  4. Tab out of Combo box while selecting the item
    By salimh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2013, 02:50 PM
  5. Combo Box- Selecting more than one value
    By Dave32 in forum Excel General
    Replies: 2
    Last Post: 04-08-2008, 07:58 AM
  6. selecting data in combo box
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-18-2006, 01:00 PM
  7. adding info to combo box
    By JT in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-18-2005, 10:06 AM
  8. [SOLVED] [SOLVED] getting info from a combo box
    By Steve in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-05-2005, 08:06 PM

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