+ Reply to Thread
Results 1 to 4 of 4

Populate multi listbox with filtered (only visible) table data

  1. #1
    Registered User
    Join Date
    02-24-2019
    Location
    UK
    MS-Off Ver
    MS 365 PC & Mac (assume PC unless otherwise stated in post)
    Posts
    96

    Populate multi listbox with filtered (only visible) table data

    Some guidance with this code would be much appreciated.

    In a nutshell I try to show only filtered data (visible rows) from table in my multi column list box. I managed to get it working by copying filtered data and pasting to new table (filtered_tbl) and referencing that, but I thought it was a bit of a clunky solution and seemed to create problems in other areas of my form when text boxes etc. were not sure which table (actions_tbl or filtered_tbl to reference), so I thought I would go back and have another stab at trying to set the range from the original table with the filters applied.

    Below code generates Run time error '70': Permission denied error, when I click debug, it highlights following line

    Please Login or Register  to view this content.
    The full code is here (adapted from another forum post I found);

    Please Login or Register  to view this content.

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,158

    Re: Populate multi listbox with filtered (only visible) table data

    Deleted....Mac user
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

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

    Re: Populate multi listbox with filtered (only visible) table data

    Without full listing not sure how you are filtering.
    Look through the code of the attached file it may give you some ideas.
    The four comboboxes supply the filter string "ystr" and identify the filter field "X"
    Each combination is separately passed through Sub FILTR which loads arrays which load the listbox with the visible rows.
    The slight flicker is the table been filtered then reset.
    See if the app works on your Mac first before trying to replicate any coding.
    torachan.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-24-2019
    Location
    UK
    MS-Off Ver
    MS 365 PC & Mac (assume PC unless otherwise stated in post)
    Posts
    96

    Re: Populate multi listbox with filtered (only visible) table data

    Thanks torachan, it was not exactly what I had in mind, but it was a help nonetheless. I will share my sheet on the forum soon (it is a bit of a mess at the moment) to demo what I am doing.

    I am actually working on PC at the moment so no Mac issues with this project.

+ 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 filtered data into listbox
    By Ghost12 in forum Excel General
    Replies: 1
    Last Post: 11-01-2020, 10:11 AM
  2. [SOLVED] populate filtered values to listbox
    By Ghost12 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-30-2020, 08:57 AM
  3. [SOLVED] Populate ListBox from filtered table
    By nordicdust in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-31-2020, 04:43 AM
  4. [SOLVED] Populate UserForm ListBox with unique values from filtered data
    By karmapala in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-28-2019, 12:54 PM
  5. [SOLVED] Populate a Listbox with Unique data of filtered range
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-23-2018, 02:35 AM
  6. Populate ListBox with Filtered Range
    By smartbuyer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2015, 01:09 AM
  7. Pivot table to refresh and source data to change using visible rows on a filtered sheet
    By papasmurfuo9 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-27-2014, 11:32 AM

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