+ Reply to Thread
Results 1 to 4 of 4

Populate a text box based off of a list box?

  1. #1
    Registered User
    Join Date
    07-27-2020
    Location
    DC
    MS-Off Ver
    2016
    Posts
    5

    Unhappy Populate a text box based off of a list box?

    Hello,

    I am having issues figuring out how to populate a text box based off of a list box.

    I have a list box for Ticket Type, then a list box to select a Category from based on the Ticket Type, and another list box to select a Sub Category from dependent on what Category was chosen. I need my text box to populate with text based off of the Sub Category selection.

    I tried to do a vlookup based on the reference cell for the Sub Category list box, but because its only 1 - 5 it outputs the same information regardless of what Category I selected before selecting my Sub Category. And I need the user to be able to copy paste the text it outputs, so this just does not work.

    I've been told I may need to use VBA to accomplish what I need to accomplish but I have no idea where to start. Does anyone have any suggestions?

    I attached a scrubbed version of the workbook I'm trying to get working. Obviously all the sub-categories won't be the same in my actual work book ^^; Also featuring my failed attempt to get the vlookup to work as an option.
    Attached Files Attached Files
    Last edited by halie_m; 07-27-2020 at 08:21 PM. Reason: Add attachment

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Populate a text box based off of a list box?

    Try this.
    Please Login or Register  to view this content.
    Or, instead of only populating the listbox with the values from column E populate it with values from both columns, hide the 2nd column and when a selection is made in the listbox return the value from the second column.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    07-27-2020
    Location
    DC
    MS-Off Ver
    2016
    Posts
    5

    Re: Populate a text box based off of a list box?

    When I try to run that on textbox1 it gives me the error "Compile error: Method or member not found" and highlights the line "Private Sub UserForm_Initialize()"

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Populate a text box based off of a list box?

    The only thing I changed in the UserForm_Initialize was to set xRg to include column F.

+ 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. Populate List Box from Text box
    By shamli0709 in forum Access Tables & Databases
    Replies: 2
    Last Post: 08-29-2018, 05:31 PM
  2. Replies: 5
    Last Post: 06-08-2018, 11:15 AM
  3. Populate list based on criteria
    By HAZELLBOO in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-10-2017, 12:34 AM
  4. Text box to populate based on drop-down list cell value while sheet is "protected".
    By rxharp419 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-30-2017, 06:40 PM
  5. [SOLVED] trying to populate a list box based on textbox value
    By justlearning123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-08-2015, 08:41 PM
  6. [SOLVED] How to auto populate multiple Text Boxes from list based on value of a cell
    By MooseAUH in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2014, 03:40 AM
  7. Replies: 3
    Last Post: 02-28-2012, 11:54 AM

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