Turning off display while VBA running

B

Bob Bridges

Seems to me I once saw an option I can turn off to keep Excel from updating
the display while my program inserts rows, fills in data, hides/unhides rows
and such, so it'll run faster if there's a lot to be accomplished...the idea
being that the program will turn the display, so to speak, back on just
before it gets to End Sub. Now I want to use that feature and I can't find
it in my VBA/Excel chm. Can anyone tell me where to look for it? Thanks.
 
L

L. Howard Kittle

Try:

Application.ScreenUpdating = False
Application.ScreenUpdating = True

At the beginning and at the end of your code.

If your code calls other code to do some "stuff" then you may still get
screen flickering as that code excetutes, so you may need to include

Application.ScreenUpdating = False
Application.ScreenUpdating = True

in that called code also.

Also knowing that once you go to the other called code the
Application.ScreenUpdating = False is now negated in the original code and
when the code comes back to the next line of the original code and you may
get screen flickering again as it continues.

HTH
Regards,
Howard
 
F

FSt1

hi
at the begining of our code, add this......
Application.ScreenUpdating = False

then before the sub finishes, add this.......
Application.ScreenUpdating = True

if you turn screenupdating off, always be sure to turn it back on.

Regards
FSt1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top