Hello!
I've got a macro that creates a line chart based on the data in a pivot table.
Originally, I had
in the VBA, causing the chart to appear in its own sheet. When I used one of the drop down menus on the pivot table to remove rows from the table, the chart updated accordingly, showing lines only for the fields shown in the table.Code:ActiveChart.Location Where:=xlLocationAsNewSheet
However, once I removed the above line of code, as I need the chart to appear in the same worksheet as the table, the chart no longer updates when I change the pivot table. It always shows all the data, regardless of how I change the table.
Does anyone know of a way to put the chart in the same worksheet as the pivot table but still have it update when I change the pivot table?
I used the following to move a pivot chart sheet to a pivot chartobject on a worksheet without a problem.
I think we need more detail of what you did.
Code:ActiveChart.Location Where:=xlLocationAsObject,Name:="Sheet1"
Thanks Andy, but my problem is simply that, when I make a chart based on a pivot table in its own sheet, it updates along with the source table. When it's in the same sheet as the table, it doesn't. I'm not sure how to sort out this problem.
Last edited by Ambulare; 11-20-2008 at 08:17 AM.
Can you construct an example and attach it?
Also which version of xl are you using?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks