Results 1 to 2 of 2

Running one macro after another has completed

Threaded View

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    69

    Running one macro after another has completed

    Hi there,

    I have a macro that needs to run after another macro has completed. The first macro refreshes all data on the Excel document and the following macros do a copy paste routine. But the problem is that the later 2 macros depend on the first macro completing its data refresh. At the moment if I run my current macro it quickly does the copy and paste routine as that only takes a couple of seconds whilst in the background it is still doing the data refresh which can take 2 minutes to complete. How can I run the later 2 macros only after the data refresh completes? Thanks so much in advance for your help!

    Sub REFRESHALLDATA()
    '
    ' REFRESHALLDATA Macro
    '
    '
        ActiveWorkbook.REFRESHALL
    
        Sheets("1").Select
        Application.Run "'document1.xlsm'!COPYPASTE1"
    
        Sheets("2").Select
        Application.Run "'document1.xlsm'!COPYPASTE2"
    
    End Sub
    Last edited by martinpgibson; 08-15-2013 at 06:31 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. having visiblity changes to autoshapes/command buttons after a macro is completed
    By paxile2k in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-27-2010, 05:04 PM
  2. Problem Running Macro for Completed Code
    By vargs in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-11-2010, 01:46 PM
  3. Macro for completed files
    By Nunzio in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-27-2009, 10:27 AM
  4. Closing Workbook After Macro Completed
    By Launchnet in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-21-2008, 12:19 PM
  5. Has anyone ever encountered an error AFTER the macro has completed
    By eluehmann in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-10-2006, 11:20 PM

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