If you want to keep refreshing the data on a regular basis, you can make the macro run itself : Application OnTime « Application « VBA / Excel / Access / Word






If you want to keep refreshing the data on a regular basis, you can make the macro run itself

 
     Dim mdteScheduledTime As Date

     Sub RefreshData()
         ThisWorkbook.UpdateLink Name:="C:\YourExcel2007File.xlsx", Type:= xlExcelLinks
         mdteScheduledTime = Now + TimeSerial(0, 1, 0)
         Application.OnTime mdteScheduledTime, "RefreshData"
     End Sub

     Sub StopRefresh()
         Application.OnTime mdteScheduledTime, "RefreshData",, False
     End Sub

 








Related examples in the same category

1.Run on time
2.Set Refresh Data Timer
3.Using Application.OnTime to Periodically Analyze Data
4.The OnTime event
5.Scheduling a Macro to Run Every Two Minutes
6.Use OnTime to trigger the refresh data
7.writes the time to cell A1 and also programs another event five seconds later.