Share via


QueryTable.AfterRefresh Event

Excel Developer Reference

Occurs after a query is completed or canceled.

Syntax

expression.AfterRefresh(Success)

expression   A variable that represents a QueryTable object.

Parameters

Name Required/Optional Data Type Description
Success Required Boolean True if the query was completed successfully.

Return Value
Nothing

Example

This example uses the Success argument to determine which section of code to run.

Visual Basic for Applications
  Private Sub QueryTable_AfterRefresh(Success As Boolean)
    If Success Then
        ' Query completed successfully
    Else
        ' Query failed or was cancelled
    End If
End Sub

See Also