Populating ListBox in excel with visible cells in filtered Range

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jonathanD
    New Member
    • Feb 2008
    • 1

    Populating ListBox in excel with visible cells in filtered Range

    Excel Gurus,

    I am suffering with a problem with the following Code

    Code:
            
    Me.ListBox1.List = Range("a1:f10").Cells.SpecialCells_(xlCellTypeVisible).VALUE
    The listbox will popoulate however as soon as the range is autofiltered, only the first line of the autofiltered data will be displayed rather than the entire autofilter range.

    Any help will be appreciated!
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    In VB6, I'am not sure, you can give List of items by just setting the "List" Property.
    What you can do, is Set the Range Filter Filter Results , to Some TempRange..
    and Loop through and Populate the Listbox (using List1.AddItem). .

    Regards
    Veena

    Comment

    Working...