I have looked at previously answered questions on this subject and tried to apply the answers to my macro but I keep getting run time errors (13)when I try to apply it.I would appreciate any help.
Code:
Sub TestPivot()
Dim test1 As Range
Set test1 = Sheets("Raw Data").Range("B1:T100000")
Sheets("Summary").PivotTables("PivotTable1").ChangePivotCache ActiveWorkbook. _
PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
test1 _
, Version:=xlPivotTableVersion14)
Set test1 = Nothing
End Sub
Thanks,
Ciaran.