+ Reply to Thread
Results 1 to 4 of 4

ListBox to display data based on ComboBox value

  1. #1
    Registered User
    Join Date
    07-09-2017
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    5

    ListBox to display data based on ComboBox value

    Hi all

    This is my first post and I have very limited knowledge with vba coding.

    I picked up the below coding to populate a listbox with data from a worksheet based on what was selected from a combobox (using RowSource). The problem is the listbox is only displaying one row, which I assume means its not looping to check more rows.

    Any help would be greatly appreciated.

    Cheers

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: ListBox to display data based on ComboBox value

    There is no looping in that code.

    Any chance you could upload a sample workbook?

    Click on GO ADVANCED, scroll down and click Manage Attachments.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    07-09-2017
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    5

    Re: ListBox to display data based on ComboBox value

    Sample attached.
    Attached Files Attached Files

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: ListBox to display data based on ComboBox value

    Here you go.
    Attached Files Attached Files
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ 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] ComboBox to populate Listbox and 2nd Combobox based on 1st combobox dropdown choice
    By bbqqsmokeman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2017, 08:21 PM
  2. combobox to search any worksheet and display each data in a listbox.
    By Marlon1980 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-18-2015, 03:42 PM
  3. Replies: 1
    Last Post: 05-30-2015, 12:15 PM
  4. [SOLVED] Display in Listbox,based on combobox select the spare cards history
    By Mikebau in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-19-2013, 06:05 PM
  5. Trouble copying autofilter data to listbox based on combobox values
    By Blackbeginnings in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-26-2013, 10:48 AM
  6. Replies: 2
    Last Post: 12-07-2012, 02:10 AM
  7. [SOLVED] display data based on a combobox
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-09-2006, 03:25 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