Hello: I'm trying to refresh all pivots (total of 4 pivots) that are contained on one worksheet (MTHLY_Report) within my workbook. I have an ActiveX combo box that I want to trigger the refresh. Below is the code I have started but I am getting a Run-Time Error '91'. I am struggling with how to fix this error and would appreciate any assistance.
VBA Code:
Private Sub cboRptPeriod_Change()
Dim wks As Worksheet
Dim pvt As PivotTable
Set Worksheet = Sheets("MTHLY_Report")
For Each pvt In wks.PivotTables
pvt.RefreshTable
Next pvt
End Sub