Athrika
Athrika

Reputation: 63

Screen Flickering VBA Excel

This is something I have read a lot myself but couldn't find the solution. I have a program of about 10,000 lines where I have a procedure attach to a particular command button. This calculates some complex equations.

I have started the code as usual with Application.ScreenUpdating = False and turned it to True just before ending of the main procedure. Yet just the upper part of my Excel Sheet (near the Menu Bar) keeps flickering about 10 second until the result appears. I tried disabling events, as well as turning the calculations to manual, but nothing helps. Even tried mentioning screen updating to false at the beginning of sub procedures related to main procedure.

Any suggestion regarding this will be really appreciated. Thank you!

Upvotes: 1

Views: 1442

Answers (1)

BruceWayne
BruceWayne

Reputation: 23283

Try adding this at the start of the sub:

Application.EnableEvents = False
Application.DisplayStatusBar = False
Application.Calculation = xlCalculationManual

And this just before the end:

Application.EnableEvents = True
Application.DisplayStatusBar = True
Application.Calculation = xlCalculationAutomatic

That should help. Note though, my screen also flickers sometimes when running complex macros (Excel looks like it's not responding, but it's working in the background).

Upvotes: 1

Related Questions