+ Reply to Thread
Results 1 to 6 of 6

Combine two macros with a delay

  1. #1
    Registered User
    Join Date
    03-03-2022
    Location
    Sweden
    MS-Off Ver
    Win 10
    Posts
    2

    Red face Combine two macros with a delay

    Hi All!

    On the verge of optimize my workflow and save a lot of time

    I'm trying to combine two macros and with the second one with some delay.

    My skill level is "noob" so I humbly ask for some aid from some with some better expertice

    The first code will open up all excelfiles in a specific folder.

    The second code will compile all the workbooks in to the same sheet and then close tem.

    Now, to open the excelfiles and depending on the amount that can vary, it can take some time
    so the second macro should run first after all the excelfiles are opened.

    The first code:

    Please Login or Register  to view this content.

    Second code:

    Please Login or Register  to view this content.
    Would be very thankful for any input.


    BR
    Fred

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    MS365 V.2406
    Posts
    2,310

    Re: Combine two macros with a delay

    Could not edit post...
    Last edited by dangelor; 03-03-2022 at 09:59 AM.

  3. #3
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    MS365 V.2406
    Posts
    2,310

    Re: Combine two macros with a delay

    Ignore the above post... (couldn't edit it correctly)

    Possibly...
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-03-2022
    Location
    Sweden
    MS-Off Ver
    Win 10
    Posts
    2

    Re: Combine two macros with a delay

    Hi Dangelor!

    Thank you for the response!
    However, there now seems to be something missing, now it will not open any files or save them, it only creates the new sheet (sammanställning)
    I can't really see what can be causing this.

    Again, thanks for the help.

    Best regards from a cold and snowy Sweden

  5. #5
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,641

    Re: Combine two macros with a delay

    Hi there,

    I haven't tried to test your "CombineMultipleSheetsToExisting" routine, but the following version of your "vba_open_multiple_workbooks_folder" routine will wait until all workbooks are open before attempting to call the "CombineMultipleSheetsToExisting" routine:

    Please Login or Register  to view this content.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Last edited by Greg M; 03-03-2022 at 10:23 AM. Reason: Typo corrected

  6. #6
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    MS365 V.2406
    Posts
    2,310

    Re: Combine two macros with a delay

    Typo error. Change this line
    Please Login or Register  to view this content.
    to this
    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. Replies: 2
    Last Post: 06-14-2020, 06:26 AM
  2. [SOLVED] Combine 2 Macros
    By luxy007 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-11-2017, 03:12 AM
  3. Delay Automatic Updates until Macros Run
    By Duffman828 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-06-2012, 11:22 AM
  4. how to combine macros
    By ENEMALI in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-07-2011, 08:45 AM
  5. How to combine 2 macros into one
    By Foxcan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-16-2009, 04:46 PM
  6. Delay in Opening Excel files with Macros
    By nandanam in forum Excel General
    Replies: 1
    Last Post: 03-17-2006, 08:15 AM
  7. [SOLVED] Combine 2 macros into 1 Please.
    By Steved in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-19-2005, 07:05 AM

Tags for this Thread

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