ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Tips to speed up VBA with several workbooks open. (https://www.excelbanter.com/excel-programming/415453-tips-speed-up-vba-several-workbooks-open.html)

[email protected]

Tips to speed up VBA with several workbooks open.
 
I was wondering if there are any tips out there to allow faster
execution of VBA with several workbooks open?

For example, I have a macro that deletes some cells contents in five
different sheets in the same workbook.

With no other workbooks open it takes 2 seconds to complete.
With other workbooks then it takes more than 10 seconds to complete.
This is just an example.
Obviously the fact that there are other workbooks open has an impact
on the execution.
Any way to speed up this?

Tim Williams

Tips to speed up VBA with several workbooks open.
 
Have you tried turning off screenupdating and setting calculation to manual
?

Tim

wrote in message
...
I was wondering if there are any tips out there to allow faster
execution of VBA with several workbooks open?

For example, I have a macro that deletes some cells contents in five
different sheets in the same workbook.

With no other workbooks open it takes 2 seconds to complete.
With other workbooks then it takes more than 10 seconds to complete.
This is just an example.
Obviously the fact that there are other workbooks open has an impact
on the execution.
Any way to speed up this?




[email protected]

Tips to speed up VBA with several workbooks open.
 
I am using screenupdating all over the place yes...
Manual Calculation not so much, I will give it a try to see if it
makes a difference.

On Aug 11, 1:23*am, "Tim Williams" <timjwilliams at gmail dot com
wrote:
Have you tried turning off screenupdating and setting calculation to manual
?

Tim

wrote in message

...



I was wondering if there are any tips out there to allow faster
execution of VBA with several workbooks open?


For example, I have a macro that deletes some cells contents in five
different sheets in the same workbook.


With no other workbooks open it takes 2 seconds to complete.
With other workbooks then it takes more than 10 seconds to complete.
This is just an example.
Obviously the fact that there are other workbooks open has an impact
on the execution.
Any way to speed up this?



[email protected]

Tips to speed up VBA with several workbooks open.
 
Why does it slow so much with several workbooks opened with no links
between them?

ytayta555

Tips to speed up VBA with several workbooks open.
 
On 11 Aug, 17:50, " wrote:
Why does it slow so much with several workbooks opened with no links
between them?


Maybe because for every change in ActiveWorkbook are recalculated all
opened
wbooks ...it's an ideea , I'm not shure.

I has problems with delete of cell contents and I found that
Range("...")ClearContents
work faster than Range("...").Delete


All times are GMT +1. The time now is 02:59 AM.

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