time macro takes run

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Time that macro takes to run increases each time. | Excel forum

Time that macro takes to run increases each time. | Excel forum

resolvedResolved · High Priority · Version 2003

Tony has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course
Project Intro Intermediate course

Time that macro takes to run increases each time.

I have a bunch of procedures that I use to process a spreadsheet full of data.

Each time that I run these, on the same set of data, the time that it takes for the macro to complete iit's processing increases.

Closing all open spreadsheets, then re-opening them, in order to run the macro again has no affect - the duration continues to increase from the longest time that it took previously.

Closing, then re-opening the Excel application itself though, resets the duration of these procedures back to a relatively short amount of time.
The duration will then again continue to increase each time that the macro is run.

Please can anybody point me in the right direction of the sort of things that may cause something like this??

Any ideas or advice would be greatly appreciated.

Many Thanks,

Tony

RE: Time that macro takes to run increases each time.

Hi Tony

Thanks for your question

There are a number of issues here , and we need to narrow down the options. Could you clarify the following for me

1. What is the form of the processing? In particular are you using your own bespoke functions functions or arrays?
2. Are you using class modules? If so could you give me a brief overview of how you are using them. A critical question is are you clearing the collection after each iteration

Regards

Stephen

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Random Numbers

Type =RAND()*200 to generate a number between 1 and 200.
Use the fill handle to drag down and populate as many cells as you'd like with random numbers.

View all Excel hints and tips


Server loaded in 0.07 secs.