![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 18
|
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 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
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 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|