Hi there,
A created a lot of pivot tables. I tried to record a macro in order to refresh the pivot table and also the pivot graphs, but i dont know how to link a button to refresh the tables linked to a required month in a cell. The macro is shown bellow:
Sub Atualizar()
'
' Atualizar Macro
'
'
ActiveSheet.PivotTables("Tabela dināmica8").PivotFields("Data").ClearAllFilters
ActiveSheet.PivotTables("Tabela dināmica8").PivotFields("Data").PivotFilters. _
Add Type:=xlAllDatesInPeriodSeptember
ActiveSheet.PivotTables("Tabela dināmica1").PivotFields("Data").ClearAllFilters
ActiveSheet.PivotTables("Tabela dināmica1").PivotFields("Data").PivotFilters. _
Add Type:=xlAllDatesInPeriodSeptember
ActiveSheet.PivotTables("Tabela dināmica2").PivotFields("Data").ClearAllFilters
ActiveSheet.PivotTables("Tabela dināmica2").PivotFields("Data").PivotFilters. _
Add Type:=xlAllDatesInPeriodSeptember
End Sub
If i modify the moth to another inside the macro, it works. But i want to type a specific moth in a cell a push a button to refresh.
Thank you so much.
Leandro
Bookmarks