+ Reply to Thread
Results 1 to 8 of 8

Charging a listBox from value selected other ListBox and dynamic populate

  1. #1
    Registered User
    Join Date
    01-08-2017
    Location
    Barcelona
    MS-Off Ver
    Office 2019
    Posts
    82

    Charging a listBox from value selected other ListBox and dynamic populate

    Hi everyone

    I'm starting with vba early and I don't know mucho more for now. I'm trying to put some value of a range at column A that have variable size and show into ListBox2 the values are at his row (also variable size).

    for exaxmple If I selected value from a2 at ListBox1 show at Listbox2 values from B2 until column2 that have values (in this case C2). If select A3 show B3 until C3 ....

    Also I want to do this with arrays and give the posibiliti to update this values (remove, adding or modify). I think this must be make it with cycles for or something and property ListBox Selected but I don't achieve the solution. Any help will or sugest how can read will be fantastic

    I upload a test file I beguinin with, it is por and badly and I know it have lot of mistakes (names given to the arrays) etc. I'm working in it.

    Note : for mistake I put this message here and it wa intended to be at VBa forum thread. Anyone can move it?
    Attached Files Attached Files
    Last edited by Judith_Chao; 01-25-2017 at 03:07 AM.

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Charging a listBox from value selected other ListBox and dynamic populate

    Please Login or Register  to view this content.
    Kind regards
    Leo
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    01-08-2017
    Location
    Barcelona
    MS-Off Ver
    Office 2019
    Posts
    82

    Re: Charging a listBox from value selected other ListBox and dynamic populate

    Quote Originally Posted by LeoTaxi View Post
    Please Login or Register  to view this content.
    Kind regards
    Leo
    Thanks a lot ! IT Works .

    Only one question if you can provide another time a solution or reference me to a method or function to learn about it.

    At this listboxes I need to add two bottons to update and modify the records. I hope there is no so difficult for the first listbox, but i don't figure out how to do at the rows, horizontal range (perhaps used separated values with #or ¿?¿?¿

    Any help will be greatfully recieved. Any way i give you the fórum reputation because you solved my first question perfectly

  4. #4
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Charging a listBox from value selected other ListBox and dynamic populate

    Select 1 item in listbox2 and 3 labels show up with there functions


    Kind regards
    Leo
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-08-2017
    Location
    Barcelona
    MS-Off Ver
    Office 2019
    Posts
    82
    Quote Originally Posted by LeoTaxi View Post
    Select 1 item in listbox2 and 3 labels show up with there functions


    Kind regards
    Leo
    Hi ! Thanks a lot !

    It t works but it shows an error: if the item selected at ListBox1 have 1 or 0 items to show at ListBox2.

    Also I try to adapt the code and use the same system to add values to List Box1. I've been able to make it write the value at the sheet but when I select it in order to adding values at ListBox2 (range defined in row) it show and error and must close.

    Any idea how to solve it ? Thank you for your proposal (I love it) 😁

  6. #6
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Charging a listBox from value selected other ListBox and dynamic populate

    I made some modifications and extra button for new rows.


    Kind regards
    Leo
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-08-2017
    Location
    Barcelona
    MS-Off Ver
    Office 2019
    Posts
    82

    Re: Charging a listBox from value selected other ListBox and dynamic populate

    Sorry I'm late to answer but i went out yesterday. I revised the file (many thanks) but it continues to have a mistake, if you have only one ítem at the row.

    I make some changes at your design but i can't get the solution. Hope you can ssay me what i've benn doing worng.

    I upload my file in order you can see my proposal, I Split the data onto two sheets to make easiest the references and the actualization.

    Also I need it advice you if you delete some value that is in use at the database, and warning you saying you must delete all the values before delete the ítem.

    Thank you in advance for any help you can provide.
    Attached Files Attached Files
    Last edited by Judith_Chao; 01-29-2017 at 02:25 PM.

  8. #8
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Charging a listBox from value selected other ListBox and dynamic populate

    I have no mistakes in file from #6


    Kind regards
    Leo

+ 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 (ca 200) Txtboxes depending on listbox selection, live-filter for listbox &1 more
    By InternInNeed in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-14-2016, 09:56 AM
  2. I want to populate a listbox with a combobox selected item.
    By Bailers in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-11-2014, 06:42 AM
  3. [SOLVED] How do I populate a listbox with a list excluding values found in another listbox?
    By Hokiefan00 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-27-2014, 01:47 PM
  4. [SOLVED] Can't populate an array with selected items from listbox
    By jamesdeuce in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2014, 09:57 PM
  5. VBA - Populate Listbox based on value selected in another ListBox (On Userform)
    By raaboo in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-12-2012, 11:18 AM
  6. Populate userform listbox based on value selected in another listbox
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-07-2012, 05:16 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