• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Refresh data table using VBA

mr_hiboy

Member
Afternoon,

I need some help with what I thought was a simple refresh.

I'm trying to create a button that will update the data in a hidden sheet. I use this same code in a different file and it works fine, but this new file is using a data table.

Code:
ActiveWorkbook.Worksheets("2015 YTD").Range("E8").QueryTable.Refresh BackgroundQuery:=False

Any help would be appreciated.

thanks
 
Not as precise, but if you don't have a bunch of other PivotTables or something, you could do:
Code:
ThisWorkbook.RefreshAll
which will refresh all Data sources in your workbook.
 
Back
Top