Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Application.ScreenUpdating = False

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have noticed that alot of people put this statement at the beginning of their macros:

    Application.ScreenUpdating = False

    and then at the end of the macro, it is usually turned backed to = True.

    What exactly is the benifit of this?

    Thanks.

    Mav

  2. #2
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    HI Mav

    The use of this is ideal for recorded macros as it prevents the screen flickering you often get. All is basically does is prevent the screen from 'repainting' and hence speeds up code.



  3. #3
    MrExcel MVP Jay Petrulis's Avatar
    Join Date
    Mar 2002
    Location
    Chicago, IL USA
    Posts
    2,040
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi,

    Just to add to Dave's explanation, I believe these adding these two lines to the top of your porcedure

    Application.ScreenUpdating = False
    Application.Calculation = xlCalculationManual

    do more to speed up code than anything else. Of course there are other time savers, like never selecting anything unless necessary, avoid looping if you can, etc.

    So, efficient code plus these two lines really gets your macro humming.

    Make sure you change them back to

    Application.ScreenUpdating = True
    Application.Calculation = xlCalculationAutomatic

    when the routine ends.

    http://www.decisionmodels.com is a website that offers a bunch of secrets to speeding up code.

    Bye,
    Jay

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •