ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using the Application.ScreenUpdating = False? (https://www.excelbanter.com/excel-programming/321926-using-application-screenupdating-%3D-false.html)

susan hayes

Using the Application.ScreenUpdating = False?
 
Hi again

My second question!

I am trying to stop the screen from flickering during calculation when program runs.
I have tried this by putting it at the beginning (false) and end (true) of a sub() but still flickers
Application.ScreenUpdating = False

My program has for loops that execute less then100 times and some if/else select/case statements. Some cells change
color and values are deleted aswell.
-its running on a p3

Any advice?

Application.EnableEvents = False seems to do a better job in the Worksheet_Change then the above but still get some
flickering

Thanks

Mike




Dave Peterson[_5_]

Using the Application.ScreenUpdating = False?
 
Usually "application.screenupdating = false" does a nice job.

But there are some builtin routines that turn it back on (without your knowledge
or consent).

The best you can do is try to isolate these and put a
"application.screenupdating = false" right after it gets changed.

You may also want to double check to see if your routine calls another routine
that turns screenupdating back on when it's done. (Maybe this is the real
cause!)

I'd pepper statements like:

debug.print "step 99: " & application.screenupdating

(varying the step #) throughout the code to help isolate the problem.

Application.screenupdating and application.enableevents are two different
things. .enableevents = false stops anything you're doing from firing another
event (either the same even worksheet_change or a different one).



Susan Hayes wrote:

Hi again

My second question!

I am trying to stop the screen from flickering during calculation when program runs.
I have tried this by putting it at the beginning (false) and end (true) of a sub() but still flickers
Application.ScreenUpdating = False

My program has for loops that execute less then100 times and some if/else select/case statements. Some cells change
color and values are deleted aswell.
-its running on a p3

Any advice?

Application.EnableEvents = False seems to do a better job in the Worksheet_Change then the above but still get some
flickering

Thanks

Mike


--

Dave Peterson


All times are GMT +1. The time now is 09:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com