Hi
some simple code but will not work
Get an error on .CurrentPage = a
Please help
some simple code but will not work
VBA Code:
Private Sub CommandButton1_Click()
Dim a As String
Dim pt As PivotTable
ThisWorkbook.Worksheets("Pivot").Activate
a = Worksheets("Pivot").Cells(1, 4).Value
For Each pt In ActiveSheet.PivotTables
With pt.PivotFields("Shift")
.ClearAllFilters
.CurrentPage = a
End With
Next
End Sub
Please help