+ Reply to Thread
Results 1 to 4 of 4

Severely slow performance, Macro just stops

  1. #1
    Registered User
    Join Date
    10-10-2003
    Location
    Massachusetts
    MS-Off Ver
    Office 365
    Posts
    88

    Severely slow performance, Macro just stops

    If we run the next snippet a new workbook opens instantly. If we paste to the new workbook it takes forever.

    Please Login or Register  to view this content.


    We would like to run the following code, but the performance is intolerable.

    It will take 20 seconds to open the temporary workbook.

    Then the paste takes 30 seconds.

    If we run the macro without any breaks - the macro stops after the paste command - just as if an end command was run.

    if we put breaks after every line in the macro, all the lines will run and the macro will continue. It just takes forever to open and paste into the temp workbook.
    Then the macro just stops which is totally baffling. No crash. Just stops.



    Please Login or Register  to view this content.
    Attached is the "Parent" worksheet. Any blank workbook can be used for the temporary workbook.

    We're glad to accomplish the task of saving one sheet from the parent workbook to a new workbook any way that works.

    Going direct from the parent workbook to the WorkbookCreated from the parent Wb saves the time of opening an intermediate temporary workbook.

    We could deal with the performance issues if we had to. When the Macro just stops as if an end command was issued - that's a problem.

    All ideas are welcome.
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Severely slow performance, Macro just stops

    Try:
    Please Login or Register  to view this content.
    https://docs.microsoft.com/en-us/off...el.sheets.copy
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    10-10-2003
    Location
    Massachusetts
    MS-Off Ver
    Office 365
    Posts
    88

    Re: Severely slow performance, Macro just stops

    Changed
    Please Login or Register  to view this content.
    Another great learning experience. Another tool for the toolbox. Definitely not intuitive but does EXACTLY what we need. No intermediate sheet. Speedy enough.
    The great piece of information is that by using sheet1.copy prior to saving the workbook, ONLY the copied sheet is saved, not all the sheets in the workbook. Quite the unexpected revelation.
    Thank you TMS!!!!!!!!!!!!!!!!!!!!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Severely slow performance, Macro just stops

    You're welcome. Thanks for the rep.

+ 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. slow performance
    By johnnymac in forum Excel General
    Replies: 7
    Last Post: 11-14-2017, 10:04 PM
  2. Macro Slow Performance
    By kenadams378 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-06-2015, 02:29 AM
  3. Slow Macro Performance When Modifying 1000s of excel files
    By alexkunec94 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-27-2013, 05:54 PM
  4. Row highlighting - Slow performance
    By Stroem in forum Excel General
    Replies: 2
    Last Post: 10-31-2012, 03:36 AM
  5. slow excel performance
    By sharondavies in forum Excel General
    Replies: 2
    Last Post: 08-02-2012, 06:26 PM
  6. Fast then slow performance
    By Daniel Bonallack in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-30-2006, 05:45 PM
  7. Very slow performance while exploring.
    By Gargoyl in forum Excel General
    Replies: 1
    Last Post: 04-24-2006, 03:51 AM

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