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
Bookmarks