time macro takes run
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

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

Time that macro takes to run increases each time.

resolvedResolved · High Priority · Version 2003

replyReply Fri 26 Jun 2009, 17:21Delegate Tony said...

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

For upcoming training course dates see: Pricing & availability

replyReply Wed 1 Jul 2009, 09:35Trainer Stephen said...

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

 

Please browse our web site to find out more about
excel consulting and other Microsoft training courses.

Excel tip:

Make macros work in newer versions of Excel

If you have created macros in Excel 97 or 2000 that you want to be able to use in 2002/XP or 2003, you may need to alter the macro security settings in the newer version of Excel you are using.

To do this, go to Tools - Options - Security.

Select Macro Security and change the security setting to Low.

Tick the boxes next to 'Trust Add-ins' and 'Trust Visual Basic' and click OK.

After you have restarted Windows, you should then be able to use your macros created in earlier versions of Excel.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard