+ Reply to Thread
Results 1 to 3 of 3

Userform Intialize selecting listbox to textbox

  1. #1
    Registered User
    Join Date
    09-01-2019
    Location
    Sydney, Australia
    MS-Off Ver
    2018
    Posts
    1

    Userform Intialize selecting listbox to textbox

    Hi,


    I have 10 listboxes in my userform and I can double click each listbox lines and populate information from there to 10 textboxes.


    Im wondering if I can in Userform Intialize, once the userform opens that the information in listboxes be populated automatically to the textboxes.


    I have a code below but doesn't do anything really just selects the first list but no double click


    Please Login or Register  to view this content.
    Thanks


    Steve
    Last edited by Leith Ross; 01-24-2020 at 01:10 AM. Reason: Added Code Tags

  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 Intialize selecting listbox to textbox

    I suppose the Listboxes have multiple lines in them since you speak of doubleclick to populate the textboxes.

    So my question is how to know at startup which line needs to be transferred ???
    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
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Userform Intialize selecting listbox to textbox

    How are the list boxes populated? RowSource or an .AddItem approach or ....

    Which item in the listbox do you want to go to the text boxes?
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ 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] Pre-selecting Listbox value from cell value in Userform
    By peterchclarke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2019, 08:26 AM
  2. Userform Listbox selection to textbox
    By colin7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-18-2019, 04:00 PM
  3. Listbox to textbox userform
    By Okatie in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-30-2016, 03:50 PM
  4. Populate Textbox from offset cells when selecting listbox item
    By Glherriott in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-30-2016, 02:00 AM
  5. 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
  6. Listbox and Userform to populate textbox - Help!
    By reyreyreyes in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-22-2015, 01:32 PM
  7. Problem in calling a function at intialize event of userform
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2010, 07:54 AM

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