#1
|
|||
|
|||
Application.ScreenUpdating Question
Obviously you can use Application.ScreenUpdating to speed up the performance of an intensive macro:
Code:
Application.ScreenUpdating = False ' code of macro Application.ScreenUpdating = True Code:
Application.ScreenUpdating = False ' code of macro Application.ScreenUpdating = True Exit Sub ' more code of macro Application.ScreenUpdating = True |
#2
|
||||
|
||||
I prefer not to use exit sub, but goto a label at the end of the macro where the macro is tidied up e.g. as follows
Code:
Sub Macro1() Dim orng As Range Application.ScreenUpdating = False ' code of macro GoTo lbl_Exit ' more code lbl_Exit: Application.ScreenUpdating = True Set orng = Nothing Exit Sub End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Application.ScreenUpdating not working? | Welshgasman | Word VBA | 3 | 05-02-2017 08:42 AM |
Macro Needed to Insert Asnwer to A Question in Multiple Choice Format Question | rsrasc | Word VBA | 7 | 03-28-2014 12:28 PM |
What application to use? | pfergy | Office | 1 | 03-12-2011 08:46 PM |
Best application to use? | FrankW | Office | 2 | 06-13-2009 01:16 AM |
Categories question & replying with attachment question | glitzymama | Outlook | 0 | 03-15-2006 09:32 AM |