+ Reply to Thread
Results 1 to 4 of 4

Populate data in listbox in a form

  1. #1
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Populate data in listbox in a form

    Hi Friends,
    How do I populate data in a listbox which is there in a form. And change the data once I change the tab.
    Like I have names in different tabs named as A,B,C etc. Now there is a form where i have inserted a tabstrip and named as A,B,C etc.
    What I want it the names are populated in the the Listbox depending on the tab I select, like if I select tab A in the form all the names in the sheet A is listed, when I select tab B in the form all the names in the sheet B is listed and so on.
    Please note that the names are not final as I will add and delete later on so it will be great if the list get's automatically updated when I click the Button "Call List" in the "Mainsheet".Please help me.
    best regards,
    me.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Populate data in listbox in a form

    ZZZZ- Contact Testing.xlsm

    Hi Fatalcore,

    Please see the attached workbook and check if it does what you need. Can you modify it to your needs? Please update me with any other requests, or simply to indicate that it works as desired.

  3. #3
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Populate data in listbox in a form

    Hello there,

    Attached is your original workbook updated to include the code you needed. Now when the button is selected to show the userform, the userform on open populates the tab strip with the names of the worksheets in the workbook, skipping the first worksheet. Then when a tab is selected on the tabstrip the listbox populate with the information in the worksheet that corresponds with the tabstrip name.

    Let me know if this works for you!

    Thanks!
    Attached Files Attached Files

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Populate data in listbox in a form

    Hi Fatalcore,

    Here's what I come up with. Check it out.


    Attachment 171180

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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