Upravit

Sdílet prostřednictvím


QueryTable.AfterRefresh event (Excel)

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.

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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.