Cloning a 2007 PIvotChart

devo_clubber

New Member
Joined
Jul 5, 2005
Messages
7
Hi,

I am trying to copy out a worksheet to a new workbook. This worksheet includes a pivotchart and a pivotable, where the pivottable is the charts datasource.

When i copy the sheet to a “New” book, the chart is no longer linked to the pivotchart and it remains static.

As part of my cloning code I then run this to link the two again:
ActiveChart.SetSourceData Source:=Range("MyReport'!$D$7:$F$14")
which works.

I've a few different reports out there and wanted an automatic method to find out what the sourcedata for the original chart was, Then i could just apply this to the copychart automatically

So I guess I am asking for a getsourcedata command, but cannot find one.

I am working in compatibility mode, but I get the same outcome no matter which mode i work in.

Any ideas?

Cheers

Steve
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,215,560
Messages
6,125,527
Members
449,236
Latest member
Afua

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top