+ Reply to Thread
Results 1 to 4 of 4

VBA Select a line from a listbox and populate form

  1. #1
    Registered User
    Join Date
    10-14-2021
    Location
    Canada
    MS-Off Ver
    365
    Posts
    10
    I found the problem. I don't know how to erase this post.
    Last edited by Monikbor; 10-14-2021 at 03:05 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: VBA Select a line from a listbox and populate form

    I don't understand a couple of things in your code.

    Please Login or Register  to view this content.
    I is never set, so this line of code will refer to Listbox1.List(0), the first element. Do you mean to put a loop around this?

    Do not GoTo or Select cells just to reference them.

    Here is my best guess, but it would help to have your file. See yellow banner at the top.

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    10-14-2021
    Location
    Canada
    MS-Off Ver
    365
    Posts
    10

    Re: VBA Select a line from a listbox and populate form

    Hi 6StringJazzer

    Thanks for your answer.
    I finally could make it work, but your answer was exactly what I needed to solve the next problem I found.
    Effectively, it only worked for the first line!

    Thanks again!

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: VBA Select a line from a listbox and populate form

    Quote Originally Posted by Monikbor View Post
    I found the problem. I don't know how to erase this post.
    We don't delete posts here. We strongly prefer that if you solve a problem that you post your solution instead of wiping out the question. That way it will help other people who later are searching for a solution to a similar problem.

+ 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] Multi Select ListBox selections to populate TextBox in list form
    By Tarena in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-26-2018, 10:30 AM
  2. Populate TextBox with certain line of a MultiColumn ListBox Value
    By abulkhairi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-28-2018, 03:46 PM
  3. select line in userform listbox to populate another lostbox
    By simeonmein in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-10-2013, 05:13 PM
  4. Select Combobox and populate Listbox
    By kapoeira in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-07-2013, 06:19 AM
  5. Populate data in listbox in a form
    By fatalcore in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-30-2012, 09:42 AM
  6. How to Populate another Range from a Multi-Select ListBox ?
    By Winon in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-19-2011, 04:49 PM
  7. Populate Listbox on Form Load
    By Kesey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-08-2007, 10:52 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