ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Prevent calculation (https://www.excelbanter.com/excel-programming/320789-prevent-calculation.html)

Pat

Prevent calculation
 
When I run a lengthy piece of code the sheet immediately calculates even
though a calculation (which takes quite a while) has not been included in
the code. Is there a way to prevent this from happening?

Pat



Paul B

Prevent calculation
 
Pat, try this

Application.Calculation = xlCalculationManual
'your code here
Application.Calculation = xlCalculationAutomatic


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Pat" wrote in message
.. .
When I run a lengthy piece of code the sheet immediately calculates even
though a calculation (which takes quite a while) has not been included in
the code. Is there a way to prevent this from happening?

Pat





Pat

Prevent calculation
 
Paul B,
your additional code has help speed up my spreadsheet, many thanks.
Pat

"Paul B" wrote in message
...
Pat, try this

Application.Calculation = xlCalculationManual
'your code here
Application.Calculation = xlCalculationAutomatic


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Pat" wrote in message
.. .
When I run a lengthy piece of code the sheet immediately calculates even
though a calculation (which takes quite a while) has not been included in
the code. Is there a way to prevent this from happening?

Pat








All times are GMT +1. The time now is 10:05 AM.

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