+ Reply to Thread
Results 1 to 16 of 16

Copy destination:= is extremely slow with small range???

  1. #1
    Registered User
    Join Date
    06-21-2019
    Location
    Earth
    MS-Off Ver
    2019
    Posts
    7

    Question Copy destination:= is extremely slow with small range???

    Hello.

    I have a small "template" form (A1:L19) that I need to copy multiple times to a different worksheet for printing.
    It takes over half a minute for excel to copy it 20 times.
    The "template" contains joined cells, colors, different formattings, row heights, etc.

    Please Login or Register  to view this content.
    without SR.Copy Destination:=DR line it takes maybe 5 seconds (still a bit too long for what's it's doing)

    Is there anything can be done to optimize and speed up this process?

    Thank you.

    Windows 10 x64 Pro, MS Office Pro 2019
    Attached Files Attached Files
    Last edited by vanowm; 06-22-2019 at 03:51 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Copy destination:= is extremely slow with small range???

    Try adding this to your code at the beginning

    Please Login or Register  to view this content.
    and add this before the Sub End

    Please Login or Register  to view this content.
    and see if that makes a difference
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    06-21-2019
    Location
    Earth
    MS-Off Ver
    2019
    Posts
    7

    Re: Copy destination:= is extremely slow with small range???

    Thank you for the suggestion. Unfortunately it didn't make any difference, still takes 31 seconds.

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Copy destination:= is extremely slow with small range???

    What about adding
    Please Login or Register  to view this content.
    at the start of the code &
    Please Login or Register  to view this content.
    at the end.

  5. #5
    Registered User
    Join Date
    06-21-2019
    Location
    Earth
    MS-Off Ver
    2019
    Posts
    7

    Re: Copy destination:= is extremely slow with small range???

    Unfortunately no change.

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Copy destination:= is extremely slow with small range???

    Can you share a desensitised version of your workbook, as your code takes 0.5 seconds for me.


    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  7. #7
    Registered User
    Join Date
    06-21-2019
    Location
    Earth
    MS-Off Ver
    2019
    Posts
    7

    Re: Copy destination:= is extremely slow with small range???

    Probably should've done that from the beginning...I've attached test.xlsx to the original post.
    Thanks.

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Copy destination:= is extremely slow with small range???

    Thanks for the file, but it still only takes me 0.5 seconds for your code to run.
    So there must be something else going on.
    If you step through the code using F8 where does it get hung-up?

  9. #9
    Registered User
    Join Date
    06-21-2019
    Location
    Earth
    MS-Off Ver
    2019
    Posts
    7

    Re: Copy destination:= is extremely slow with small range???

    It doesn't hangs anywhere for the most part, but sometimes it takes a second or two on SR.Copy Destination:=DR line.
    I've added
    Please Login or Register  to view this content.
    before the "copy" line and held F8 button, it only revealed that it hands inconsistently through out the loop and only on that line.

    Just tested on another computer also with MS Office 2019 and it does exactly same thing. Maybe it's this version related? I didn't change any settings in the application itself. Also maybe worth mention, task manager shows 0% usage from excel.exe

  10. #10
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Copy destination:= is extremely slow with small range???

    As the suggestions already made don't make a difference to the time & there's no obvious point at which your code gets hung-up, I'm afraid I'm at a loss & cannot help any further.

  11. #11
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Copy destination:= is extremely slow with small range???

    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  12. #12
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Copy destination:= is extremely slow with small range???

    I took the liberty of reformatting your form to remove merged cells. With it, this code ran instantaneously...
    Please Login or Register  to view this content.
    Attached Files Attached Files

  13. #13
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Copy destination:= is extremely slow with small range???

    @vanown
    Hi
    we understand you value your privacy, but, OTOH, using " here" as location does not help other members when they try to help you, as, in some cases, regional settings can play an important part in helping you.
    So , please adapt your profile.
    Thank you

  14. #14
    Registered User
    Join Date
    06-21-2019
    Location
    Earth
    MS-Off Ver
    2019
    Posts
    7

    Re: Copy destination:= is extremely slow with small range???

    Very interesting, your code works lightning fast even with my original template (with merged cells), except it doesn't copy rows height, a minor issue, which can be fixed.
    It does however changes data in each copy by increasing all found numbers, which also easily fixed by changing autofill line to
    Please Login or Register  to view this content.
    So far all evidences point out something wrong with my Office/computer...just tested with different version on virtual computer it worked fine there, installed exactly the same OS and Office on this computer and..same issue..

  15. #15
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Copy destination:= is extremely slow with small range???

    Your new profile does not help much...

  16. #16
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Copy destination:= is extremely slow with small range???

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. No help to be offered until the link is provided.)
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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 Run Extremely Slow after Large Manual Copy/Paste
    By PicoTTS in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-06-2019, 04:49 PM
  2. [SOLVED] Extremely slow copy paste (cause known, solution not)
    By amros in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-12-2017, 09:01 AM
  3. [SOLVED] Copy/Drag Down for Data range's running extremely slow.
    By Hyflex in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-23-2011, 01:35 AM
  4. Extremely Slow code. Please Help
    By flyersguy4 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-30-2011, 09:26 PM
  5. FileCopy extremely slow
    By Idiot in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-07-2008, 12:10 AM
  6. EXTREMELY slow toolbars?
    By Maury Markowitz in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-23-2006, 11:20 AM
  7. [SOLVED] Workbook is now Extremely Slow
    By Dmorri254 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-03-2005, 02:19 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