vba archiving old invoices working but slow, need to optimise

  • Hi all, i have a large spreadsheet which contains all my active, invoice sent, paid and cancelled invoices (called "JOBS"), i also have another sheet for an overview (called "INVOICES"), and finally a third sheet which is for archiving the job sheets (called "ArchiveJobs"). My macro is working well moving things around but it is painfully slow and i know there is some tricks i'm missing. I've been advised to get rid of selecting items but i can't figure out the code on certain lines to replace it with. I also know that turning screen updating off will help but i'm worried if it crashed on something that i won't see what the error is or if i need to exit early i won't know when to break the code.

    Any help would be much appreciated.

    Below is my working code which archives the jobs to a separate sheet and also moves folders in my dropbox that are related to the current invoice in to an archived folder inside dropbox.

    I'm afraid i am not allowed to attach the workbook.

  • Re: vba archiving old invoices working but slow, need to optimise

    Quote from skywriter;771471

    What is,"'Trades.xlsm'!Invoices_Sheet_To_Default_View", you are using application.run with this as an argument?

    Hi Skywriter, Thanks for your reply.

    I've attached the three bits of code that are called from the original code on the loops:
    1st resets the view,
    2nd resizes the comments box
    3rd moves the files in dropbox if there are any to be moved when the invoice is archived.

    Is there anything in particular i appear to be doing wrong?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!