Hey Guys,
So I found and used the following code before and it worked fine. Today I deleted a tab with that had a Pivot on it, but this vba is not specific...so I'm a little confused.
Any help?
Sub RefreshAllPivotTables()
Dim PT As PivotTable
Dim WS As Worksheet
For Each WS In ActiveWorkbook.Worksheets
For Each PT In WS.PivotTables
PT.RefreshTable
Next PT
Next WS
End Sub
Also, if I attempt to refresh an individual table, it does not refresh neither. I have verified each of the tables' data ranges and they are correct-which are pointing to the same database.
Edit: It tells me "The PivotTable field name is not valid. To create a pivot report . . . ." My data IS where it was originally, unchanged and I haven't changed any names of the tables, at all.
Bookmarks