Sub RefreshPT()
Dim wsh As Worksheet
Dim pvt As PivotTable
For Each wsh In Worksheets
wsh.Unprotect Password:="secret"
For Each pvt In wsh.PivotTables
pvt.PivotCache.Refresh
Next pvt
wsh.Protect Password:="secret"
Next wsh
End Sub
Copyright©1996-2021,Tapuz Media Ltd. Forum software by XenForo® © 2010-2020 XenForo Ltd.