+ Reply to Thread
Results 1 to 3 of 3

Userform Listbox selection to textbox

  1. #1
    Registered User
    Join Date
    06-27-2019
    Location
    UK
    MS-Off Ver
    2010
    Posts
    98

    Userform Listbox selection to textbox

    I have a listbox on a userform (lboProjects) which has a list of projects. When I select a project I want a textbox (txtboxprojectnames) on the userform to equal the selected name.

    I have tried a few codes but haven't managed to get it working. Any help would be greatly appreciated!


    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: Userform Listbox selection to textbox

    REVISED POSTING
    ------------------------------------
    I don't think you need the MessageBox because the user cannot remove the selection in the ListBox once it has been made. If you want, you could pop the MessageBox in the UserForm's Initialize event but you would need to change the message to something like "Please make a selection from the ListBox" or some other indicator that an action is required. As for putting the value in the TextBox, this should be sufficient...
    Please Login or Register  to view this content.
    Last edited by Rick Rothstein; 09-18-2019 at 03:54 PM.

  3. #3
    Registered User
    Join Date
    06-27-2019
    Location
    UK
    MS-Off Ver
    2010
    Posts
    98

    Re: Userform Listbox selection to textbox

    Rick,

    Thanks for taking the time to help me.

    That works perfectly..cant believe it was something so simple.

+ 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. 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
  2. [SOLVED] ListBox Selection to TextBox
    By gsandy in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-26-2017, 12:25 AM
  3. VBA - Userform - Listbox validation and Listbox to Textbox
    By stevefisher85 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-04-2016, 07:11 AM
  4. Userform ListBox depending on a previous Listbox selection
    By Figolu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-23-2015, 04:31 PM
  5. Userform ListBox depending on a previous Listbox selection
    By Figolu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-23-2015, 02:08 PM
  6. [SOLVED] Add each Listbox Selection to Textbox
    By coreytroy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-22-2014, 07:17 PM
  7. [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

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