+ Reply to Thread
Results 1 to 6 of 6

Speedup ActiveX ListBox

  1. #1
    Forum Contributor
    Join Date
    05-23-2014
    Location
    Fredericia, Denmark
    MS-Off Ver
    Windows Office 2013, Excel 10
    Posts
    139

    Speedup ActiveX ListBox

    I have an inventory of approximately 200 rows and 250 columns of data, including short text and numbers. There are several formulas throughout and about 20% of all cells have Comments. I am using an ActiveX ListBox to sort and hide/unhide rows based on the text entries in a single column (IG). The ListBox macro is:
    Please Login or Register  to view this content.
    In my spreadsheet there are actually 18 different food groups, but you get the idea...

    The macro for showing all rows is:
    Please Login or Register  to view this content.
    It is lightning fast. Works great.

    A standard macro to show rows for just one food group is:
    Please Login or Register  to view this content.
    Here's the problem. Selecting anything but "SHOW ALL ROWS" takes about 4-5 seconds. Is there some way I can speed this up without changing the macro to hide/unhide rows based on row #? I need to avoid this as the number of rows for each food group can change and I don't want to be constantly editing the macros to reflect that. Any ideas?

    BTW, I also intend to do the same for columns, with a second ListBox. This will allow a user to quickly & accurately isolate just a few cells throughout this large sheet file. And, in case you're wondering, I'm using a ListBox rather than a ComboBox as I want to show the entire list at-a-glance, to hasten the selection process.

    Thanks for your help. David

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

    Re: Speedup ActiveX ListBox

    David

    Couldn't you use Excel's built-in filtering functionality?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    05-23-2014
    Location
    Fredericia, Denmark
    MS-Off Ver
    Windows Office 2013, Excel 10
    Posts
    139

    Re: Speedup ActiveX ListBox

    Could you be more specific, please?

  4. #4
    Forum Contributor
    Join Date
    05-23-2014
    Location
    Fredericia, Denmark
    MS-Off Ver
    Windows Office 2013, Excel 10
    Posts
    139

    Re: Speedup ActiveX ListBox

    Norie, I investigated the built-in filtering but I don't think it will work because there are about 10 rows of data at the top that I always need to be revealed when hiding/unhiding rows. Is there anything I can do to adjust my code below to speed it up? Otherwise, I'm stuck with hiding/unhiding rows & columns based on specific ranges. The benefit of hiding/unhiding based on matching cell content to a referenced cell is that if I add a row or column all I have to make sure is that it is populated with the correct text in the referenced row or column range. This will save me from having to edit dozens of macros if adding/deleting rows or columns. Any thoughts you have are very much appreciated. David

  5. #5
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Speedup ActiveX ListBox

    Hi David,
    try so
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    05-23-2014
    Location
    Fredericia, Denmark
    MS-Off Ver
    Windows Office 2013, Excel 10
    Posts
    139

    Re: Speedup ActiveX ListBox

    Thanks Nilem! This works beautifully. I appreciate your help very much. David

+ 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] fill listbox (ActiveX) based combobox (ActiveX)
    By elsg in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-31-2014, 11:25 AM
  2. Having trouble with ActiveX listbox
    By burkejay in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-31-2012, 12:16 PM
  3. [SOLVED] Multicolumn Listbox (ActiveX)
    By ABSTRAKTUS in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-19-2012, 07:56 AM
  4. ListBox - Form vs ActiveX
    By Roseus in forum Excel General
    Replies: 4
    Last Post: 12-29-2010, 11:55 AM
  5. ActiveX Listbox Control
    By TrendyProgrammer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-02-2005, 04:05 PM

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