📜  vba 全部刷新 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:08.395000             🧑  作者: Mango

代码示例1
I have solved the issue by using the following

    For Each sht In .Sheets
        For Each qt In sht.QueryTables
            qt.Refresh
        Next qt
        For Each lo In sht.ListObjects
            lo.QueryTable.Refresh BackgroundQuery:=False
        Next lo
        For Each pvt In sht.PivotTables
            pvt.PivotCache.Refresh
        Next pvt
    Next sht