ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Don't show sheet switches when running macro (https://www.excelbanter.com/excel-programming/330071-dont-show-sheet-switches-when-running-macro.html)

Ben

Don't show sheet switches when running macro
 
Hi,
Is there some code that will enable me to run a macro without excel
switching between the various sheets that are used.
Essentially I want to be able to click the button for the macro and the
sheet to update without all the others being displayed as the macro runs.
Thanks for any help
Ben

Alok

Don't show sheet switches when running macro
 
Application.ScreenUpdating = False
Your code
Application.screenUpdating=true
will do it

Alok Joshi
"Ben" wrote:

Hi,
Is there some code that will enable me to run a macro without excel
switching between the various sheets that are used.
Essentially I want to be able to click the button for the macro and the
sheet to update without all the others being displayed as the macro runs.
Thanks for any help
Ben


Dick Kusleika[_4_]

Don't show sheet switches when running macro
 
Ben

You can use Application.ScreenUpdating = False, setting it back to True at
the end of the macro.

You can also write your code in such a way that other sheets aren't
activated, as described here
http://www.dicks-blog.com/archives/2...-and-activate/

--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com

Ben wrote:
Hi,
Is there some code that will enable me to run a macro without excel
switching between the various sheets that are used.
Essentially I want to be able to click the button for the macro and
the sheet to update without all the others being displayed as the
macro runs. Thanks for any help
Ben




Ben

Don't show sheet switches when running macro
 
Solved this now!!
I used "Application.ScreenUpdating = False"
If anyones interested!!

"Ben" wrote:

Hi,
Is there some code that will enable me to run a macro without excel
switching between the various sheets that are used.
Essentially I want to be able to click the button for the macro and the
sheet to update without all the others being displayed as the macro runs.
Thanks for any help
Ben


Tom Ogilvy

Don't show sheet switches when running macro
 
A much better way is to do what Dick advised!!!!! Rewrite you code so it
doesn't do the selecting and activating!!!!!

If your interested!!!!!!

--
Regards,
Tom Ogilvy



"Ben" wrote in message
...
Solved this now!!
I used "Application.ScreenUpdating = False"
If anyones interested!!

"Ben" wrote:

Hi,
Is there some code that will enable me to run a macro without excel
switching between the various sheets that are used.
Essentially I want to be able to click the button for the macro and the
sheet to update without all the others being displayed as the macro

runs.
Thanks for any help
Ben





All times are GMT +1. The time now is 10:04 PM.

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