+ Reply to Thread
Results 1 to 5 of 5

VBA running significantly slower the more times i run it

Hybrid View

  1. #1
    Registered User
    Join Date
    05-02-2018
    Location
    London
    MS-Off Ver
    MS 2013
    Posts
    58

    VBA running significantly slower the more times i run it

    Hi All,

    Unfortunately i am not able to share my code due to privacy reasons. However i have been writing a number of macros to do some forecasting. The problem that i am experiencing is that when i run the macros 5 times i get stuck at a certain percentage and it then takes ages for any progress to be made from here. Does anyone have any ideas as to how i could speed things up. The only thing i can think of is that data is being held in memory when it shouldn't be and thus clogging up calculation time.

    Any help would be much appreciated.

  2. #2
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: VBA running significantly slower the more times i run it

    Impossible to say unfortunately with so little to go on

  3. #3
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: VBA running significantly slower the more times i run it

    String manipulation, arrays... be sure to release objects when complete. Move repetitive calculations to function/subs.
    David
    (*) Reputation points appreciated.

  4. #4
    Registered User
    Join Date
    05-02-2018
    Location
    London
    MS-Off Ver
    MS 2013
    Posts
    58

    Re: VBA running significantly slower the more times i run it

    thanks for the feedback - realise it's not much to go on!

    What do you mean by releasing object when complete?

  5. #5
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125
    Quote Originally Posted by Whitethorn View Post
    thanks for the feedback - realise it's not much to go on!

    What do you mean by releasing object when complete?
    If you define a variable/object, set it to null or nothing after task finished.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Mistery: Inputbox makes my code 1000 times slower
    By munuelitu in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 02-23-2018, 10:51 AM
  2. Excel Spreadsheet running VBA macros gets slower and slower over time
    By AliJay in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-20-2017, 01:31 AM
  3. [SOLVED] Macro running slower and slower
    By jj4jj in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-07-2016, 10:26 AM
  4. [SOLVED] Macros running much slower than they had been
    By nebb in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-20-2014, 06:56 PM
  5. [SOLVED] Suddenly slower running code...
    By fgruhlke in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-10-2014, 11:20 PM
  6. What causes a macro to run slower at certain times?
    By Wegener in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-03-2014, 02:20 PM
  7. Macros running much slower in 2007/Win7
    By surfengine in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-29-2010, 05:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1