code to delete all pivot tables in a workbook
Sub DelPivots()
Dim wks1 As Worksheet
Dim pvtTables As PivotTables
Dim pvtTable As PivotTable
For Each wks1 In ActiveWorkbook.Worksheets
For Each pvtTable In wks1.PivotTables
pvtTable.TableRange2.Clear
Next
Next
End Sub