AfterRefresh Event

Microsoft Excel Visual Basic

Occurs after a query is completed or canceled.

Private Sub QueryTable_AfterRefresh(Success As Boolean)

Success    True if the query was completed successfully.

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 Sub