+ Reply to Thread
Results 1 to 3 of 3

Excel VBA, Populating ListBox

  1. #1
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Excel VBA, Populating ListBox

    Hello,

    I have a UserForm "CustomerLookupUserForm". On MultiPage Page "Page5", I have a ListBox "SDCustomerList" and five OptionButtons: "SDCentral", "SDEast","SDWest", "SDTradePartners", and "SDWholesale". Each OptionButton represents a region of the company using the application.

    I have the data I would like to load into the ListBox "SDCustomerList" in a two-column Table "NamesListTable" on Sheet "Administration". Column A is Customer Name and Column B is Region.

    How would I accomplish the following?

    I would like to load all Customers in the Customer Name column from the Table "NamesListTable" into ListBox "SDCustomerList" when the UserForm "CustomerLookupUserForm" is loaded/activated. However, I need to be able to select an OptionButton (which represents a Region), e.g. OptionButton "SDCentral", and it filter the ListBox to only show Customer Names where the Region is "SDCentral" in the aforementioned Table "NamesListTable".

    Any help is greatly appreciated.
    Thank You,

    EnigmaMatter

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Excel VBA, Populating ListBox

    Hi EnigmaMatter

    A copy of your Workbook would be helpful...

    (Attribution to Leith Roth)
    To help you with this problem, you need to post your workbook.

    This allows solutions to be tested using your code and not on code recreated based on your post.
    If your workbook contains any sensitive information, please redact that information before you post.

    How To Post Your Workbook
    • At the bottom right of the Reply window, Click the button Go Advanced
    • At the top of the Your Message Window, in the first row of icons, Click the Paperclip icon.
    • Click the Add Files button at the top right in the dialog box. This displays the File Manager dialog.
    • Click the Select Files button at the bottom middle of the dialog.
    • In the new window Find the file you want to upload, select it, and Click Open.
    • You will now be back in the File Manager dialog. Click the bottom Middle button Upload File
    .
    Wait until the file has completely uploaded before you exit the File Manager dialog.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Re: Excel VBA, Populating ListBox

    I was able to figure it out by loading it from the first column, and then filtering based on the value to the right.

+ 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] Need help with populating Listbox from another Listbox(selection); across userforms.
    By SoulPrisoner in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-28-2013, 12:54 PM
  2. Having problems populating a multicolumn listbox changing Listbox column with a loop.
    By Aristizabal95 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2013, 12:41 PM
  3. Populating Listbox by opening Excel file
    By jubaitca in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-24-2011, 01:56 AM
  4. Populating 1 listbox on the basis of another listbox selections
    By protocol in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2011, 07:33 AM
  5. Listbox of Unique Records populating another listbox
    By web2xs in forum Excel General
    Replies: 1
    Last Post: 04-16-2009, 11:27 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