+ Reply to Thread
Results 1 to 6 of 6

Delay in loading selections in userform listbox

  1. #1
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Delay in loading selections in userform listbox

    Hello,
    In the attached workbook i have a list of brands and contacts.
    On the brand sheet i have some of the contacts spread across and if they requested a brand then the word "REQUESTED" is populated in the contact's cell that is on the same row as the requested brand.
    When i open the userform and select a contact the relevant brands are automatically selected.
    The issue i am having is that it takes a long time to load every requested brand.
    Any help on hastening the import would be really appreciated.
    Attached Files Attached Files

  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: Delay in loading selections in userform listbox

    It's not loading the brands that's taking so much time is all the loops you have in the code for CustVendBox2_Change.

    For example, why are you looping to deselect every brand?

    Also, you appear to be looping through the brand list 999 times, which is 300,000+ iterations, are you sure you need to do that?

    As far as I can see all you shouldn need to do is loop down the customers column and wherever you find 'REQUESTED' use the row number to select the relevant brand, you could also deselect any brands which don't have 'REQUESTED' in the customer column.

    Something like this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Delay in loading selections in userform listbox

    Hi Norie,
    Thanks, that's much faster!
    I have a newly discovered issue, after running the code on my original MAIN workbook the code only selected the last requested item??
    It won't be easy to post my main workbook because of the time it will take to clean it and set it up properly because the data that populates the combobox and listbox exists on a separate workbook.
    Maybe that's the issue? The fact that there are two workbooks involved?

  4. #4
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Delay in loading selections in userform listbox

    I will work on creating two workbooks. stay tuned

  5. #5
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Delay in loading selections in userform listbox

    No point in posting both workbooks because it worked.
    Must be something wrong with my Main workbook.

  6. #6
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Delay in loading selections in userform listbox

    Hi Norie,
    I deleted the original list box and replaced it with a new one and it works! al though i am quite confused
    This is not the first time i experienced something like this.
    I would love to hear anyone's thoughts as to why objects can become corrupted beyond repair.

+ 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. Userform ListBox that recalls prior selections made
    By fil_oliveira in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-19-2016, 10:11 PM
  2. [SOLVED] Allow users to edit or add to previously entered Listbox selections in UserForm
    By lorikgator in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-23-2015, 05:01 PM
  3. loading ListBox row items to another UserForm
    By StartingOut in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-27-2012, 10:37 AM
  4. userform listbox that lists data based on radio button selections
    By Shogun in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-09-2012, 10:46 AM
  5. Pre-load listbox selections only loading 1 selection
    By skysurfer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-15-2010, 10:22 AM
  6. Userform ListBox that recalls prior selections made
    By skysurfer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-08-2010, 02:54 PM
  7. Time Delay stops data loading
    By cooper1308 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2009, 11:44 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