when I open the secured tab, I get an error message that I can not edit a PivotTable in a secured sheet.
there is a yellow line in the code:
Sheets("Zoekfuncties").PivotTables("Draaitabel1").PivotCache.Refresh
ScreenShot 26-02-2019 -- 20 21 54.jpg