![]() |
after refresh query
I am trying to automatically save & close a series of workbooks after
refreshing the 6 or 7 web queries they contain. There seems to be an AfterRefresh function for query tables, but I don't know how to use it. Can anybody help? JvL |
after refresh query
http://support.microsoft.com/default...b;en-us;182735
XL97: How to Use the Query Before and AfterRefresh Events -- Regards, Tom Ogilvy "JVLin" wrote in message ... I am trying to automatically save & close a series of workbooks after refreshing the 6 or 7 web queries they contain. There seems to be an AfterRefresh function for query tables, but I don't know how to use it. Can anybody help? JvL |
after refresh query
From VBA Help:
AfterRefresh Event Example This example uses the Success argument to determine which section of code to run. Private Sub QueryTable_AfterRefresh(Success As Boolean) If Success ' Query completed successfully Else ' Query failed or was cancelled End If End SubPrivate Sub QueryTable_AfterRefresh(Success As Boolean) If Success ActiveWorkbook.Close SaveChanges:=True Else MsgBox("Query failed") End If End SubHope This helpsMike F"JVLin" wrote in message ... I am trying to automatically save & close a series of workbooks after refreshing the 6 or 7 web queries they contain. There seems to be an AfterRefresh function for query tables, but I don't know how to use it. Can anybody help? JvL |
after refresh query
Thanks Tom, I found this explanation easier to follow than the one in the
help section. JvL "Tom Ogilvy" wrote: http://support.microsoft.com/default...b;en-us;182735 XL97: How to Use the Query Before and AfterRefresh Events -- Regards, Tom Ogilvy "JVLin" wrote in message ... I am trying to automatically save & close a series of workbooks after refreshing the 6 or 7 web queries they contain. There seems to be an AfterRefresh function for query tables, but I don't know how to use it. Can anybody help? JvL |
All times are GMT +1. The time now is 12:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com