ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Screen Updating (https://www.excelbanter.com/excel-programming/343509-screen-updating.html)

Ben[_10_]

Screen Updating
 
Hello,
If I want to stop the macro from flashing between sheets I use
Application.ScreenUpdating False and it works perfectly. However it is not
effective when I call the procedure that contains it from another procedure.
Is there a way round this. Thank you.



Jim Thomlinson[_4_]

Screen Updating
 
You should not be toggling screen updating in every procedure. Every time you
see

Application.Screenupdating = True

You will get a flash. Your code should look something like this

Sub This()
Application.Screenupdating = False
Call That
Application.Screenupdating = True
End sub

Sub That
Application.Screenupdating = False 'Not here

Application.Screenupdating = True 'Not here
End sub

If there is a Application.Screenupdating = True in "Sub That" then you will
get a flash at that point the sub ends.

--
HTH...

Jim Thomlinson


"Ben" wrote:

Hello,
If I want to stop the macro from flashing between sheets I use
Application.ScreenUpdating False and it works perfectly. However it is not
effective when I call the procedure that contains it from another procedure.
Is there a way round this. Thank you.




Leith Ross[_80_]

Screen Updating
 

Hello Ben,

From what you descibe the problem isn't with the macro, but with the
calling procedure. It sounds like the calling procedure is updating the
screen before your macro is executed. Place the
Application.ScreenUpdating function in the calling procedure and it
should be ok. There are instances however where
Application.ScreenUpdating will not prevent the screen from
flickering.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=478389



All times are GMT +1. The time now is 04:52 AM.

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