Excel model - Very fast first time - Very slow second time

H

Helge's

I have built a model in Excel consisting of VBA-code for transfering
data from different workbooks (where calculations is done) to a
mainbook where the macro is. A strange thing happend: the first time I
run the macro it takes about 15 sec. The next time it takes about 10
min.

Im using:
- named cells in the mainbook and the other books
- No arrayformulas/table is used
- Objectvariables (workbook, worksheet). Have tried to set them to
nothing after use.
- No link cells between the books

I realy hope any can give me a tip for what I should do.
 
A

Andrew Taylor

It might help to set Application.Calculation = xlCalculationManual
while the macro is running.
 

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