AfterRefresh 事件 (Excel)QueryTable.AfterRefresh event (Excel)

当完成或者取消一个查询时,发生此事件。Occurs after a query is completed or canceled.


表达式AfterRefresh(成功)expression.AfterRefresh (Success)

_表达式_一个代表查询表对象**** 的变量。expression A variable that represents a QueryTable object.


名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
SuccessSuccess 必需Required BooleanBoolean 如果成功完成查询,则为 TrueTrue if the query was completed successfully.

返回值Return value



本示例使用 Success 参数判断要运行代码的哪一节。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 
 ' Query failed or was cancelled 
 End If 
End Sub

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.