ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro - Prevent screen refresh (https://www.excelbanter.com/excel-programming/368630-macro-prevent-screen-refresh.html)

Bharath Rajamani

Macro - Prevent screen refresh
 
Is there a way to prevent the workbook screen display getting refreshed as a
macro runs, and make the macro run in the background without refreshing the
worksheet display.

Maybe it runs faster that way.


Rgds,

Graham Whitehead

Macro - Prevent screen refresh
 
You are quite correct. try this:

application.screenupdating=false
'
'your code here
'
application.screenupdating=true

"Bharath Rajamani" wrote in
message ...
Is there a way to prevent the workbook screen display getting refreshed as
a
macro runs, and make the macro run in the background without refreshing
the
worksheet display.

Maybe it runs faster that way.


Rgds,




Duncan[_5_]

Macro - Prevent screen refresh
 
Bharath:

Application.ScreenUpdating = False
'...
'Your code in Here
'...
Application.ScreenUpdating = True



HTH
Duncan


Bharath Rajamani wrote:
Is there a way to prevent the workbook screen display getting refreshed as a
macro runs, and make the macro run in the background without refreshing the
worksheet display.

Maybe it runs faster that way.


Rgds,




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

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