Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I 'Enable Automatic Refresh' for Query Refresh by default Anand Deshpande Setting up and Configuration of Excel 0 December 10th 06 04:47 AM
Query Refresh-Enable Automatic Refresh Dialogue Box Terri Excel Discussion (Misc queries) 0 May 6th 05 08:21 PM
Timing of automatic query refresh and macro pivot table refresh dutty Excel Programming 2 December 1st 04 07:19 PM
Excel does not close from VB!! (when i refresh Refresh query with BackgroundQuery:=False) Anant[_2_] Excel Programming 1 August 6th 03 04:22 AM
Web Query fail to Refresh All but individual refresh is ok Karyn Mak Excel Programming 2 July 17th 03 09:30 AM


All times are GMT +1. The time now is 10:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"