Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Hide screen movements when a macro is running

I generally create Macros by recording keystrokes.
One macro I have moves around the spreadsheet for about 5 minutes, copying,
pasting etc etc
But I do not want the user of the spreadsheet to see all the
movements...even though they are so quick...effectively is there a way to
'freeze the screen' at the start of the macro...so all the movement is
hidden. It may be something I have to turn back on again at the end of the
macro?

Thanks for any help available
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: Hide screen movements when a macro is running

Yes, there is a way to hide screen movements when a macro is running. You can use the Application.ScreenUpdating property to turn off screen updating at the beginning of your macro and turn it back on at the end. This will prevent the user from seeing all the movements and make the macro run faster.

Here's how you can do it:
  1. Open the VBA editor by pressing Alt + F11.
  2. In the Project Explorer window, double-click on the module that contains your macro.
  3. At the beginning of your macro, add the following line of code to turn off screen updating:

    Code:
    Application.ScreenUpdating = False
  4. At the end of your macro, add the following line of code to turn on screen updating:

    Code:
    Application.ScreenUpdating = True

That's it! Now when you run your macro, the screen will freeze at the beginning and the user won't be able to see all the movements. Once the macro is finished, the screen will unfreeze and the user will be able to see the final result.

Note: If your macro encounters an error and stops running before it reaches the line that turns screen updating back on, the screen will remain frozen. To avoid this, you can add an error handler to your macro that turns screen updating back on even if an error occurs.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 698
Default Hide screen movements when a macro is running

At the beginning

Application.ScreenUpdating = False

and at the end

Application.ScreenUpdating = True

HTH
Regards,
Howard


"STatAGL" wrote in message
...
I generally create Macros by recording keystrokes.
One macro I have moves around the spreadsheet for about 5 minutes,
copying,
pasting etc etc
But I do not want the user of the spreadsheet to see all the
movements...even though they are so quick...effectively is there a way to
'freeze the screen' at the start of the macro...so all the movement is
hidden. It may be something I have to turn back on again at the end of
the
macro?

Thanks for any help available



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Hide screen movements when a macro is running

Thanks Howard...that worked perfectly. Much appreciated!!!!

"L. Howard Kittle" wrote:

At the beginning

Application.ScreenUpdating = False

and at the end

Application.ScreenUpdating = True

HTH
Regards,
Howard


"STatAGL" wrote in message
...
I generally create Macros by recording keystrokes.
One macro I have moves around the spreadsheet for about 5 minutes,
copying,
pasting etc etc
But I do not want the user of the spreadsheet to see all the
movements...even though they are so quick...effectively is there a way to
'freeze the screen' at the start of the macro...so all the movement is
hidden. It may be something I have to turn back on again at the end of
the
macro?

Thanks for any help available



.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 698
Default Hide screen movements when a macro is running

You are welcome, thanks for the feed back.

H'wd

"STatAGL" wrote in message
...
I generally create Macros by recording keystrokes.
One macro I have moves around the spreadsheet for about 5 minutes,
copying,
pasting etc etc
But I do not want the user of the spreadsheet to see all the
movements...even though they are so quick...effectively is there a way to
'freeze the screen' at the start of the macro...so all the movement is
hidden. It may be something I have to turn back on again at the end of
the
macro?

Thanks for any help available



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
tabbed movements alpineuser Excel Discussion (Misc queries) 2 September 8th 09 09:44 PM
Screen flash while running macros Jay Excel Discussion (Misc queries) 2 December 3rd 07 09:25 PM
how can we hide the steps of macro running azam Excel Discussion (Misc queries) 3 January 9th 07 01:09 PM
If I have my sheets protected will that prevent me running a macro to hide certain sells? Marc Excel Worksheet Functions 0 May 17th 06 11:36 PM
Hide "Excel" when running VB Old Car Excel Discussion (Misc queries) 5 April 30th 05 09:56 AM


All times are GMT +1. The time now is 08:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"