Excel 2013 - 1004 runtime error Refresh Query Table BackgroundQuery:=False

前端 未结 1 771
予麋鹿
予麋鹿 2021-01-15 03:16

I have run into an issue with Excel 2013 when refreshing a QueryTable with BackGroundQuery set to False (BackgroundQuery has to be set to false for our purposes). When a que

相关标签:
1条回答
  • 2021-01-15 04:08

    Thank you all for the feedback and ideas. We found a work around that is fairly low impact for us.

    We found that this issue was only present in Excel 2013 on Query Tables that have filters applied to them before the QueryTable was refreshed.

    Our work around simply removed filtering from the sheet that has the QueryTable calling refresh with BackgroundQuery set to false then applying filters to our external data range.

    Example:

        Sheet3.AutoFilterMode = False
        Sheet3.QueryTables(1).Refresh BackgroundQuery:=False
        Sheet3.Range("ExternalData_3").AutoFilter
    

    This solution works for our needs and I hope anyone else who runs into this issue finds this work around useful.

    0 讨论(0)
提交回复
热议问题