I have the spreadhsheet which would retrieve data from MS Accesss through ADO
connection whenever the macro is run. Then, there are some fields that are added
to the excel sheet. I have a pivot table to show the data.
Now, whenever, i populate the data on spreadsheet,and I am trying to refresh
the pivot by using this code,
Dim pt As PivotTable
For Each pt In ActiveSheet.PivotTables
pt.RefreshTable
Next pt
This seems to be not working for me. Also, when I manually refresh the data on
pivot, it throws in the error for pivot table fields not being organized as
list....
Please help as I have never coded the pivot table till now.