Microsoft Office Tutorials and References
In Depth Information
11.8 QueryTable Refresh Events
Dim AppObj As New CApp
(You can use any variable name you wish in place of AppObj ).
3.
Finally, assign the App property of AppObj to the Application object, by executing the
code:
Set AppObj.App = Excel.Application
It is up to you where to place this line of code, but it must be executed in order to activate
Application-level events. (There is a certain circularity here, since a natural place to put
this code is in the WorkbookOpen event. However, this event will not fire until this code
has been executed.)
In addition to using the EnableEvents property, you can turn off Application-level events by
executing the code:
Set AppObj.App = Nothing
11.8 QueryTable Refresh Events
Table 11-5 shows the events related to QueryTables. We will not discuss QueryTables in this topic,
but at least now you are aware of the existence of these events should you decide to pursue this
matter on your own.
Table 11-5. Refresh Events
Event name
Description
AfterRefresh
Occurs after a query is completed or canceled.
BeforeRefresh
Occurs before any refreshes of the query table.
 
 
Search JabSto ::




Custom Search