code to refresh all pivot tables vba code example Example: excel vba Refreshing all pivot tables in workbook ThisWorkbook.RefreshAll