Hi All,
I am trying to control Excel PIVOT tables from a cell value with VBA. The field is at G1.
When I used below it is ok.
ActiveSheet.PivotTables("PivotTable3").PivotFields("PN").CurrentPage = "PN123"
but when I changed it to a variable so that it references G1 value, it goes to syntax error.
ActiveSheet.PivotTables("PivotTable3").PivotFields("PN").CurrentPage = "A1"
Any help is appreciated.
Regards,
Nironto
Please Login or Register to view this content.
Bookmarks