Tips to speed up VBA with several workbooks open.

H

HammerJoe

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?
 
T

Tim Williams

Have you tried turning off screenupdating and setting calculation to manual
?

Tim
 
H

HammerJoe

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.
 
H

HammerJoe

Why does it slow so much with several workbooks opened with no links
between them?
 
Y

ytayta555

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top