AfterRefresh

May 16, 2007

I 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.

View 9 Replies


ADVERTISEMENT

Query AfterRefresh Event

May 5, 2007

how to incorporate the query AutoRefresh event to my code 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... http://support.microsoft.com/kb/213187


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.

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved