Excel VSTO pivot table code revision help needed...

  • Thread starter Thread starter madforplaid
  • Start date Start date
M

madforplaid

Hello,

The first line below works cleanly in my project, but I am having
errors/issues with the next two lines.

Globals.Sheet16.PivotTables("PivotTable2").PivotCache.Refresh()
Globals.Sheet16.PivotTables("PivotTable2").PivotFields("fy").Item(1).Visibl­
e = True
Globals.Sheet16.PivotTables("PivotTable2").PivotFields("fy").Item(2).Visibl­
e = False

Please advise as to what is needed to revise the code to get it to
work as expected.

Thanks,

Kevin
 
Back
Top