+ Reply to Thread
Results 1 to 11 of 11

userform display based on combobox selection

  1. #1
    Valued Forum Contributor
    Join Date
    10-17-2007
    Location
    Tasmania, Australia
    MS-Off Ver
    2019, 365(v2310)
    Posts
    366

    userform display based on combobox selection

    Hi.

    I have a simple worksheet with 2 columns

    Column A has "Commodities" and Column B has "Requirements"

    On my userform, I am going to have a combobox to display Column A and I would like the data in Column B to display in a scrolling text box

    So if the user selects a "commodity" it will display the corresponding requirement.

    For example if someone selects "Apple"(which is in A2) it will display the "Requirement"(which is in B2) in the scrolling textbox.

    Any one able to help or able to point me in the right direction for a google search.
    Last edited by russkris; 11-21-2016 at 10:39 PM.

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: userform display based on combobox selection

    If you can provide a sample workbook with your userform and some data I'm sure we can help you out.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Valued Forum Contributor
    Join Date
    10-17-2007
    Location
    Tasmania, Australia
    MS-Off Ver
    2019, 365(v2310)
    Posts
    366

    Re: userform display based on combobox selection

    My apologies.. I thought I attached it. Now attached.

    Please excuse the code.. I am so noob when it comes to VBA.

    I havent finished the "Search" sheet, but you'll get the idea.
    Attached Files Attached Files

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: userform display based on combobox selection

    Try sample file.
    Combobox gives you sorted list of all Commodities of Search sheet. On selecting an item Requirements appear in Label.
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    10-17-2007
    Location
    Tasmania, Australia
    MS-Off Ver
    2019, 365(v2310)
    Posts
    366

    Re: userform display based on combobox selection

    Hi bakerman2

    Thank you for the sample. your version works fantastic.

    I will integrate it into my sheet.

    Thanks again

  6. #6
    Valued Forum Contributor
    Join Date
    10-17-2007
    Location
    Tasmania, Australia
    MS-Off Ver
    2019, 365(v2310)
    Posts
    366

    Re: userform display based on combobox selection

    OK. I am having some trouble adding it to the current vba code.

    Please Login or Register  to view this content.

  7. #7
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: userform display based on combobox selection

    See if this works for you.
    Have added Combobox at bottom of userform to select commodity. Second userform will popup with requirements.
    Attached Files Attached Files

  8. #8
    Valued Forum Contributor
    Join Date
    10-17-2007
    Location
    Tasmania, Australia
    MS-Off Ver
    2019, 365(v2310)
    Posts
    366

    Re: userform display based on combobox selection

    Hi bakerman2,

    Yes that works great.. I see how you integrated the code into the current, learning a bit here and there.

    I changed it around a bit so the search part is on the same screen and can be accessed without a popup..

    But I cant figure out how to make a scrolling label.
    Attached Files Attached Files

  9. #9
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: userform display based on combobox selection

    This should be it.
    Attached Files Attached Files
    Last edited by bakerman2; 11-22-2016 at 04:25 AM. Reason: Updated file.

  10. #10
    Valued Forum Contributor
    Join Date
    10-17-2007
    Location
    Tasmania, Australia
    MS-Off Ver
    2019, 365(v2310)
    Posts
    366

    Re: userform display based on combobox selection

    That is fantastic. Thank you very much.

    I will work on manually wrapping the info to avoid the horizontal scroll.

  11. #11
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: userform display based on combobox selection

    You're welcome. Thanks for adding rep points.
    Good luck with your project.

+ 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. [SOLVED] Userform: Change Combobox list based on a second ComboBox selection
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-11-2016, 03:45 PM
  2. ComboBox values source being changed based on another combobox selection in a UserForm
    By stephenanderson in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-08-2016, 11:12 PM
  3. Calculating/adding userform textbox values based on combobox selection and display to cell
    By SpreadsheetGirl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2015, 08:57 AM
  4. [SOLVED] Userform textbox value based on combobox selection
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-17-2014, 11:56 AM
  5. Userform Combobox to populate based on selection in another combobox
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-14-2014, 03:34 PM
  6. Textboxes within Userform to display info based on combobox selection
    By alter54 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-28-2012, 12:40 PM
  7. Refresh UserForm to display data that is linked to combobox selection
    By alter54 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-16-2012, 01:30 PM

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