hi, Grace !
> I'm looking for a technique to make charts automatically reference data on the current worksheet
> when I copy a worksheet containing a chart.
> In Excel 2007, the chart references the cells from the original worksheet
> while Excel 2003 would automatically update the reference.
> I can manually key in the new worksheet as the reference but this is tedious.
>
> any suggestions?
I couldn't repro (xl-2007) copying ws w/embedded chart, source data remains referencing to original ws (?)
(copied ws automatically updates the embedded chart source data to it's "new" location/ws)
perhaps with a little help from vba (?) i.e.
With ActiveSheet
.ChartObjects(1).Chart.SetSourceData _
Source:=.Range("a1:b1,a3:b5,a7:b9,a11:b13,a15:b17"), PlotBy:=xlByColumns
End With
hth,
hector.
|