Screen Updating

  • Thread starter Thread starter Jase
  • Start date Start date
J

Jase

Hi All

I have a macro that does things like opening other files,
pops up text boxes and the like. The problem is that at
the beginning I turn off screen updating and then it
decided to turn itself back on again. Does anyone know
where I can get a list of events that turn screen updating
on from?

Thanks heaps
Jase
 
First, ScreenUpdating always reverts returns to true when code
execution ends i.e. you only have control over ScreenUpdating during
run-time. Second, ScreenUpdating is local to the sub procedure, so if
Sub One sets ScreenUpdating to false then calls Sub Two, the value of
ScreenUpdating will be true in ScreenUpdating but false when execution
returns to Sub One. Third, every time you toggle ScreenUpdating the
screen flickers, so if you do it too many times it defeats the objects
of turning ScreenUpdating off. In conclusion, only toggle
ScreenUpdating in your top level sub procedures in your routines.
 
Back
Top