Name

querytable.CancelRefresh

Synopsis

Cancels an asynchronous query. You can’t refresh or delete a query while that query has refresh pending. When working with asynchronous queries, you should check the query table’s Refreshing property and (possibly) cancel the pending refresh before deleting or refreshing that query again.

The following code cancels any pending refreshes before refreshing a query:

If qt.Refreshing Then qt.CancelRefresh
qt.Refresh

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.