PDA

View Full Version : Pivot table to refreash and ask for new filter dates



ADB123
03-22-2017, 08:19 PM
Hi Friends

I use the below macro to refresh my pivot table after I imported new data. I would like the same macro to ask for ne filter dates from the SCHED_DATE. It would always be seven days from the start date.

This need to happen before the next macro in the sequence which will safe the file as a pdf before emailing it.

Any help will be appreciated



Sub RefreshAllPivotTables()
Dim PT As PivotTable
Dim WS As Worksheet
For Each WS In ThisWorkbook.Worksheets
For Each PT In WS.PivotTables
PT.RefreshTable
Next PT
Next WS
End Sub