+ Reply to Thread
Results 1 to 4 of 4

Macro slows down with each use

  1. #1
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Macro slows down with each use

    I have a Worksheet_SelectionChange event that runs very quickly the first time it is triggered after the file is opened. Selecting a cell brings up a calendar and upon selecting a date in the calendar, some data is processed. Each successive time the macro is triggered, it slows down even though the amount of data processed is the same. If I close the file and re-open it, the first time the macro is triggered, it runs quickly and then proceeds to slow down again with each successive run. Does anyone have any suggestions as to what could be causing this problem? Many thanks.

    Cross post: https://www.mrexcel.com/forum/excel-...-each-use.html
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  2. #2
    Registered User
    Join Date
    05-09-2019
    Location
    St. Louis, USA
    MS-Off Ver
    2013
    Posts
    9

    Re: Macro slows down with each use

    Without seeing the file or macro, my guess is that the calendar pops-up in some kind of userform, and rather than unloading the userform, it's just being hidden. If my theory is correct, try changing the macro to unload the calendar userform, rather than hide it.

  3. #3
    Registered User
    Join Date
    05-09-2019
    Location
    St. Louis, USA
    MS-Off Ver
    2013
    Posts
    9

    Re: Macro slows down with each use

    I checked the cross-reference. Where is CalendarFrm getting unloaded? You probably need to add Unload CalendarFrm at the end of the sub. Try that and see if it helps anything.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Macro slows down with each use

    The calendar userform is unloaded when a date is selected so I don't think that is the problem. This is the macro:
    Please Login or Register  to view this content.

+ 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. Macro slows down
    By bongielondy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-26-2019, 07:00 AM
  2. Question deleted by user
    By Jeckford in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-17-2017, 03:16 AM
  3. Macro slows down as it runs
    By Dean Staples in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-30-2013, 09:16 PM
  4. [SOLVED] Macro slows down with each successive run
    By hillbk in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-07-2013, 11:45 PM
  5. Iterating macro slows down after a few executions
    By Linkman in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-24-2010, 10:38 PM
  6. Excel 2007 : Macro - loop slows down
    By IALTO in forum Excel General
    Replies: 17
    Last Post: 05-20-2010, 12:50 PM
  7. [SOLVED] macro slows down
    By Gary Keramidas in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-21-2006, 07:45 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