+ Reply to Thread
Results 1 to 5 of 5

Is there anyway to see why ScreenUpdating is taking so long?

  1. #1
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Is there anyway to see why ScreenUpdating is taking so long?

    I turn off ScreenUpdating at the beginning of all Events, and turn it back on when it's done.

    I have managed to determine that when ScreenUpdating is set True that it takes longer than I like.
    I know that turning it on automatically triggers a calculation, which I assume is the reason it takes longer than necessary.
    Is there any way to determine what is being calculated? And more specifically how long each formula is taking?

    I'm guessing that turning ScreenUpdating to True and back to False while the macro is running would not help when the macro ends. Is that right?

    BYW: I've seen several people say that ScreenUpdating automatically gets set True when the macro ends, but the help file says that it doesn't.
    Last edited by foxguy; 10-11-2011 at 04:18 AM.
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Is there anyway to see why ScreenUpdating is taking so long?

    ScreenUpdating = True does not trigger a calculation, it forces a re-display of the screen. Calculation forces a calculation.

    The only reason I could see for it taking a long time is because there is a lot on the spreadsheet that needs re-displaying.

    Maybe people do say it gets turned back on, maybe MS say it doesn't. Do you want to trust either, and trust that it will always be that way, when it is just one simple line of code? Even if it happens automatically, it won't save you anything, the re-display will still happen.

  3. #3
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Is there anyway to see why ScreenUpdating is taking so long?

    Bob;
    I believe you're wrong about it triggering a calculation. I know that I read it somewhere in the last few days, but I can't remember where. I'm going to look for it again.

    I just tested it with this sub:

    Please Login or Register  to view this content.
    Here are the results
    Please Login or Register  to view this content.
    As you can see turning ScreenUpdating back on with absolutely no changes to the workbook took more than 20 times as long as turning it off.

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Is there anyway to see why ScreenUpdating is taking so long?

    So you're surprised that doing something takes longer than doing nothing?
    ScreenUpdating does not cause a calculation. It does however redraw the screen whether anything has changed or not.
    Remember what the dormouse said
    Feed your head

  5. #5
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Is there anyway to see why ScreenUpdating is taking so long?

    RS;
    I guess I have to concede the point. I put a Stop in Workbook_Calculate and it didn't trigger when I turned ScreenUpdting to True.

    I know I read it somewhere, but that source must have been wrong.

+ 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