+ Reply to Thread
Results 1 to 3 of 3

How to update userform textbox based on listbox selection?

  1. #1
    Registered User
    Join Date
    04-14-2021
    Location
    Long Island, NY
    MS-Off Ver
    Office 365
    Posts
    37

    How to update userform textbox based on listbox selection?

    Hi All,

    I have a macro that allows the user to move any data row to another tab. When the user opens the userform, several data fields that make up that row are auto-populated. However, when a new sheet is selected from the ListBox, three of the inputs (textboxes) need to be changed. I'm hoping to do this automatically based on their selection.

    I've tried running an something like: IF ListBox1 = "P MFI" THEN TextBox1 = "Portfolio" END IF. This does not seem to work though..

    Any thoughts?

    Thanks!
    Attached Files Attached Files
    Last edited by knykil; 05-14-2021 at 02:14 PM.

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: How to update userform textbox based on listbox selection?

    lot easier to work with a workbook than a vague description.
    see big yellow banner - how to upload a de-sensitised workbook.
    torachan.

  3. #3
    Registered User
    Join Date
    04-14-2021
    Location
    Long Island, NY
    MS-Off Ver
    Office 365
    Posts
    37

    Re: How to update userform textbox based on listbox selection?

    Quote Originally Posted by torachan View Post
    lot easier to work with a workbook than a vague description.
    see big yellow banner - how to upload a de-sensitised workbook.
    torachan.
    Hi Torachan,

    Still getting use to the forum etiquette. My apologies. I've attached the example workbook.

    When looking at the forms section, I'm referring to "Move_Case".

    After auto-populating TextBox 1, 2 and 3, with the existing values, I would like them to update immediately in the userform when the user selects the New Group Location in the ListBox1.

    For example:

    Original Values:
    Line of Business = Medical
    Segment = Portfolio
    Funding = FI (fully-insured)

    When the user selects 'L DASO', the values would automatically update to:
    Line of Business = Dental
    Segment = Large
    Funding = ASO

+ 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. Userform Listbox selection to textbox
    By colin7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-18-2019, 04:00 PM
  2. Get selection from ListBox and copy to TextBox (USERFORM)
    By nordicdust in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-05-2019, 08:54 PM
  3. Userform to Update Table Values based on a Listbox Selection
    By scottkelley80 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-27-2016, 08:49 PM
  4. [SOLVED] UserForm - How To Make TextBox Value Change Depending On ListBox Selection
    By ScotyB in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-26-2013, 05:05 PM
  5. Replies: 12
    Last Post: 08-28-2012, 07:09 AM
  6. update data based on listbox & textbox
    By SarahPintal in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-13-2010, 02:37 AM
  7. Textbox update with previous selection from listbox
    By Binsy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-29-2010, 05:03 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