Friday, 27 June 2014

How to Refresh a Pivot Table with Excel VBA Macro

Macro to Refresh a Pivot Table existed at a Dynamic Active Cell
'A Simple macro to refresh a Pivot Table whose name not know in advance , by Dynamically based on Active Cell
Sub Pvt_Refresh()

ActiveSheet.Range("I4").Select
Pivot_Name = Selection.PivotTable.Name

ActiveSheet.PivotTables(Pivot_Name).PivotCache.Refresh
'ActiveWorkbook.RefreshAll [ To Refresh all Pivots Data  in a WorkBook ]
End Sub





Thanks.,TAMATAM

No comments:

Post a Comment

Hi User, Thank You for Visiting My Blog. Please Post Your Feedback/Comments/Query.

Subscribe to Blog Posts by Email

ExcelKingdom-Popular Posts

ExcelKingdom-Random Posts