AfterRefresh
May 16, 2007I looked around to see how to incorporate the query AutoRefresh event with no success. I'm just a beginner with VBA and I don't know how to use the code.
Here is the link that explains how to use the Query AfterRefresh event... [url]
Here is my
Public diropen
Sub AutoRefresh()
Application.DisplayAlerts = False
Application.ScreenUpdating = True
diropen = "C:Documents and SettingsjsotoDesktop"
Workbooks.Open diropen & "Test.xls" _
, UpdateLinks:=0
ActiveWorkbook.RefreshAll
ActiveWorkbook.Save
Workbooks("Test.xls").Close
End Sub
As you can see, it's a simple code to open the workbook, refresh the linked query (from Access), save and close it.