+ Reply to Thread
Results 1 to 3 of 3

Poor performance when triggered by event but fast when hitting F5

  1. #1
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Poor performance when triggered by event but fast when hitting F5

    Attached is a project I was helping another member on [stusic=macros to automatically update form=212185-BOM.xlsm]. I have added VBA to create a list based on a BOM worksheet. Results are in worksheet List. It is triggered by a change on worksheet BOM via Worksheet_Change. When it runs from the event, it takes around 90 seconds to run. But if I hit F5 in the VBA development window, it takes less than 1 second.

    It does not make any changes to the BOM worksheet, therefore will not trigger any recursive calls to Worksheet_Change.

    What can possibly be different about those two modes of invocation that would cause such a disparity in performance?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Poor performance when triggered by event but fast when hitting F5

    It takes about 1 second for me to run for both methods.

    I say restart your PC and try again.

  3. #3
    Registered User
    Join Date
    04-30-2008
    Posts
    67

    Re: Poor performance when triggered by event but fast when hitting F5

    It took me about 15 seconds, on my friend's, it took around 25. I turned off screen updating and it's almost instantaneous.

    Btw, this works fantastically well!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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