A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Sorry, I forgot to add the code to unprotect/protect the sheet.
If all sheets in your workbook are protected with the same password, you can use the following:
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
where "secret" is the password.