ramozpratama
New Member
- Joined
- Dec 3, 2019
- Messages
- 4
- Office Version
- 2019
- Platform
- Windows
Dear Mr Excel,
Need help with my VBA Code in macro excel.
Here is my pivot table field list (table pivot name --> "CASA2017" and field name "CIF17")
I want to auto filter this pivot table with cell value in A1:A30 but in another sheets (sheet1).
I Try this code, but only read filter based on A1 value only
Sub Filter17()
Dim PT17 As PivotTable
Dim PF17 As PivotField
Set PT17 = Worksheets("Sheet2").PivotTables("CASA2017")
Set PF17 = PT17.PivotFields("CIF17")
PT17.ClearAllFilters
PT17.AllowMultipleFilters = True
PF17.EnableMultiplePageItems = True
PF17.CurrentPage = Worksheets("Sheet1").Range("A1:A30").Value
End Sub
Please help to correct my code.. Thank you so much.. Sorry for bad english
Need help with my VBA Code in macro excel.
Here is my pivot table field list (table pivot name --> "CASA2017" and field name "CIF17")
I want to auto filter this pivot table with cell value in A1:A30 but in another sheets (sheet1).
I Try this code, but only read filter based on A1 value only
Sub Filter17()
Dim PT17 As PivotTable
Dim PF17 As PivotField
Set PT17 = Worksheets("Sheet2").PivotTables("CASA2017")
Set PF17 = PT17.PivotFields("CIF17")
PT17.ClearAllFilters
PT17.AllowMultipleFilters = True
PF17.EnableMultiplePageItems = True
PF17.CurrentPage = Worksheets("Sheet1").Range("A1:A30").Value
End Sub
Please help to correct my code.. Thank you so much.. Sorry for bad english