+ Reply to Thread
Results 1 to 5 of 5

ComboBox1 to fill ListBox1 with multiple columns

  1. #1
    Registered User
    Join Date
    03-20-2020
    Location
    Orlando, FL
    MS-Off Ver
    2016
    Posts
    3

    Cool ComboBox1 to fill ListBox1 with multiple columns

    Howdy Friends! Hope you're all doing well. (2 questions)
    The below code works pretty well. Just looking for help with tweaking it a little. I have an inventory database with multiple columns (Sheet2). On my current userform, I can select an item from column "E" with my combobox1 (NOT UNIQUE). On the ListBox1, a list of Product ID's will show. Basically, When I select an item from the combobox, the list shows me my company's id number(s) for that item (from column A). Most have more than one ID number since it's the same item, just from different suppliers. Other columns include supplier sku's, descriptions, pricing, etc.
    My question one is: Is it possible to tweak this code to be able to show more columns?
    My question two is: Is it possible to populate the list as I'm typing? Meaning, if I type the letter "c", then everything that contains a "c" appears. If I type an "a" after the "c", then everything containing a "ca" will remain on the list.
    My Code:
    Please Login or Register  to view this content.
    Sample.jpg
    Sample2.jpg
    Last edited by SolarRay; 03-20-2020 at 11:43 AM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: ComboBox1 to fill ListBox1 with multiple columns

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

    To upload a file click the Go Advanced button at the foot of your post, look underneath the post area for the Manage Attachments section and take it from there.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    03-20-2020
    Location
    Orlando, FL
    MS-Off Ver
    2016
    Posts
    3

    Re: ComboBox1 to fill ListBox1 with multiple columns

    AlphaFrog, sorry for the delay.
    Attached Files Attached Files

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: ComboBox1 to fill ListBox1 with multiple columns

    Answering this in two halves.
    Easier to see by reading through the code.
    You need to set the number of columns and their widths.
    Also to show $ and decimals the columns have to be formatted on loading.
    Which column do you want the preemptive search on ?
    torachan.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-20-2020
    Location
    Orlando, FL
    MS-Off Ver
    2016
    Posts
    3

    Re: ComboBox1 to fill ListBox1 with multiple columns

    torachan, thank you! The way you set it up is exactly what I was looking for.

+ 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. Select listbox1 item and Press EDIT button to make changes in listbox1 values
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-04-2014, 08:36 AM
  2. [SOLVED] Multiple Columns which need to be combined with some columns not having all the cells fill
    By kikboxr777 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-30-2014, 01:38 AM
  3. [SOLVED] Fill an ActiveX ListBox1 with data from Table1
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-02-2014, 05:13 PM
  4. ListBox1 only returns 10 columns of data from a search
    By StartingOut in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-28-2012, 07:53 AM
  5. Multiple Columns to Two Columns and then fill down data to end
    By LVernon in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-14-2012, 11:08 AM
  6. Using Entry of ComboBox1 to decide the entries of ComboBox2 using Excel Columns
    By sungodking in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-12-2012, 08:11 AM
  7. Using Entry of ComboBox1 to decide the entries of ComboBox2 using Excel Columns
    By sungodking in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-12-2012, 06:51 AM

Tags for this Thread

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