ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how do I turn the screen off during macro execution (https://www.excelbanter.com/excel-worksheet-functions/258054-how-do-i-turn-screen-off-during-macro-execution.html)

redondo

how do I turn the screen off during macro execution
 
There a way to turn off the screen when macros are executing so you can't see
the macro running and then turn the screen on to display the results when the
macro has completed. I can't figure out how to do this in excel 2007.

L. Howard Kittle

how do I turn the screen off during macro execution
 
I don't have 2007 but I think this will work.

Application.ScreenUpdating = False
'your code
Application.ScreenUpdating = True

HTH
Regards,
Howard

"redondo" wrote in message
...
There a way to turn off the screen when macros are executing so you can't
see
the macro running and then turn the screen on to display the results when
the
macro has completed. I can't figure out how to do this in excel 2007.




Gord Dibben

how do I turn the screen off during macro execution
 
See Howard's reply for turning off the jumping around.

If your code is written properly there may no need for jumping around.

Get rid of "selects" and "activates" as much as possible.

Example from macro recorder.......

Range("A1:A19").Select
Selection.Copy
Sheets("Sheet1").Select 'or Activate
Range("A7").Select
ActiveSheet.Paste

Can be written as...........

Range("A1:A19").Copy Sheets("Sheet1").Range("A7")


Gord Dibben MS Excel MVP

On Thu, 4 Mar 2010 14:51:01 -0800, redondo
wrote:

There a way to turn off the screen when macros are executing so you can't see
the macro running and then turn the screen on to display the results when the
macro has completed. I can't figure out how to do this in excel 2007.




All times are GMT +1. The time now is 11:13 PM.

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