Hi please see the code below. Currently it allows me to change the Source Data of my pivot tables in a sheet through the use of an input box. The only issue is I have to make the same change for every pivot table using the input box. Ideally I would like to make the one change in the input box and it affects all the pivot table. I have a feeling it may be an easy fix with a looping function or the changing of the "Each" text. Any help would be greatly appreciated.
Thanks
Sub EquityChange_Pivot_Source()
Dim pt As PivotTable
For Each pt In ActiveWorkbook.ActiveSheet.PivotTables
pt.ChangePivotCache ActiveWorkbook.PivotCaches.Create _
(SourceType:=xlDatabase, SourceData:=InputBox("Change Data Source", "Change Month", "Oct2012Eq!$A:$BJ"))
Next pt
End Sub
Bookmarks