Results 1 to 1 of 1

displaying a dynamic autofilter list in a listbox

Threaded View

  1. #1
    Forum Contributor
    Join Date
    11-23-2007
    Location
    Suffolk, UK
    Posts
    298

    displaying a dynamic autofilter list in a listbox

    Hi,

    I have a table (Table1) that i would like to filter and display the filtered list in a list box, at the moment it will only display the full table rather than the filtered list, any ideas who to get it to dynamic show the filtered list?
    Option Explicit
    
    
    Public Sub DisplayRange(rng As Range)
        If 16 < rng.Columns.Count Then Set rng = rng.Resize(, 16)
        
        With Me.ListBox1
            .ColumnCount = rng.Columns.Count
            .List = rng.Value
        End With
        Me.Show
    End Sub
    
    Private Sub CommandButton1_Click()
        Unload UserForm1
    End Sub
    
    
    Private Sub ListBox1_Click()
    
    End Sub
    and the commandbutton

    Option Explicit
    
        
    Sub showRange()
    
      UserForm1.DisplayRange Sheet1.Range("Table1")
        
    
    End Sub
    many thanks

    reg
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Multicolumn dynamic Listbox - Remove Duplicates in Listbox
    By s2jrchoi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2014, 12:30 PM
  2. Listbox or dynamic list
    By matius_88 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-26-2013, 08:42 PM
  3. autofilter is not displaying in full
    By greekboyuk in forum Excel General
    Replies: 2
    Last Post: 08-16-2010, 06:24 PM
  4. Listbox displaying empty entries at the end of the list
    By randell.graybill in forum Excel Programming / VBA / Macros
    Replies: 28
    Last Post: 10-27-2009, 10:00 PM
  5. [SOLVED] Write a Listbox list to a dynamic range
    By blayne in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-29-2005, 01:40 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