ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do you stop calculating when running a macro? (https://www.excelbanter.com/excel-programming/388966-how-do-you-stop-calculating-when-running-macro.html)

BZeyger

How do you stop calculating when running a macro?
 
I have a large report in which I perform numorious sorts. The report takes a
long time to create because after every sort, it goes through the
calculations. Is there a way to run the report without it calculating until
the very end?

JE McGimpsey

How do you stop calculating when running a macro?
 
One way:

Wrap your code with

Application.Calculation = xlCalculationManual

<your code here

Application.Calculation = xlCalculationAutomatic

In article ,
BZeyger wrote:

I have a large report in which I perform numorious sorts. The report takes a
long time to create because after every sort, it goes through the
calculations. Is there a way to run the report without it calculating until
the very end?


John.Greenan

How do you stop calculating when running a macro?
 
Also, switch application.screenupdating=false at the beginning and switch it
back to true at the end - that will speed things up as well.
--
www.alignment-systems.com


"JE McGimpsey" wrote:

One way:

Wrap your code with

Application.Calculation = xlCalculationManual

<your code here

Application.Calculation = xlCalculationAutomatic

In article ,
BZeyger wrote:

I have a large report in which I perform numorious sorts. The report takes a
long time to create because after every sort, it goes through the
calculations. Is there a way to run the report without it calculating until
the very end?




All times are GMT +1. The time now is 08:51 AM.

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