VBA Excel: Refresh pivot tables & tables automatically
Hello experts, I have the following procedure which allows me to refresh the various pivot tables I would like to add some enhancements:
Sub Refresh_Pivot()Dim PT As pivotTableDim WS As WorksheetFor Each WS In ThisWorkbook.WorksheetsFor Each PT In WS.PivotTablesPT.PivotCache.RefreshNext PTNext WSEnd Sub
Should I add those procedures inside modules, Sheets or ThisModules?