PDA

View Full Version : Solved: Copy a Chart into another Sheet without Links



Hamond
06-16-2009, 05:31 AM
Hi,

I've serached the net but could not find anything on this.

Is there a way in to copy chart from one sheet into another sheet without the links or break the links once the chart is in the other sheet?

For example I want to copy the range N1:R100 from sheet X to Sheet Y. Part of this range as two chart based on the data (columns b, c and d) in sheet X. In sheet Y I just want the image/pciture, i.e don't want the chart to update when data in sheet X changes.

Thanks,

Hamond

p45cal
06-16-2009, 06:46 AM
select the chart
hold down the shift key
in the drop down menu choose Edit|Copy Picture...
make further choices in the next dialogue box
paste where you want it in the usual way

Hamond
06-18-2009, 06:30 AM
Hi P45Cal,

Thanks for the suggestion. I've recorded the macro below to do it automatically and it works.


Sub copy_chartaspicture()
ActiveSheet.Shapes("Chart 1734").Select
Selection.Copy
Sheets("Results").Select
Range("C5").Select
ActiveSheet.PasteSpecial Format:="Picture (Enhanced Metafile)", Link:=False _
, DisplayAsIcon:=False
End Sub

p45cal
06-18-2009, 07:20 AM
Very good..
you could make it a tad more robust by removing Selects:Sub copy_chartaspicture()
Sheets("Sheet1").Shapes("Chart 1734").Copy
Application.Goto Sheets("Results").Range("C5")
ActiveSheet.PasteSpecial Format:="Picture (Enhanced Metafile)", Link:=False, DisplayAsIcon:=False
End Subwhich is assuming this particular chart is on a sheet called "Sheet1"!