J
JC
I have a macro that creates a PivotTable and PivotChart and moves the
PivotChart to the Summary sheet. I would like to be able to click on a
hyperlink on the Summary sheet that would filter the column field on the
PivotTable on the Tables sheet, which would update the chart on the Summary
sheet.
For instance, if the chart user clicks on Medical Supplies, the column field
filter would clear everything except medical supplies. I know the code to
filter would look like this.
Sheets(“Tablesâ€).Select
With ActiveSheet.PivotTables("PivotTable4").PivotFields("Description")
.PivotItems("Sub-total M&O").Visible = False
.PivotItems("Drugs").Visible = False
.PivotItems("Sub Contracts").Visible = False
.PivotItems("Consumable Supplies").Visible = False
End With
I just need to know how to set it up so that the PivotItems will change on a
click. Maybe I need to set it up as an event, but I am not sure. Your help
is very much appreciated.
PivotChart to the Summary sheet. I would like to be able to click on a
hyperlink on the Summary sheet that would filter the column field on the
PivotTable on the Tables sheet, which would update the chart on the Summary
sheet.
For instance, if the chart user clicks on Medical Supplies, the column field
filter would clear everything except medical supplies. I know the code to
filter would look like this.
Sheets(“Tablesâ€).Select
With ActiveSheet.PivotTables("PivotTable4").PivotFields("Description")
.PivotItems("Sub-total M&O").Visible = False
.PivotItems("Drugs").Visible = False
.PivotItems("Sub Contracts").Visible = False
.PivotItems("Consumable Supplies").Visible = False
End With
I just need to know how to set it up so that the PivotItems will change on a
click. Maybe I need to set it up as an event, but I am not sure. Your help
is very much appreciated.