View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default Copy Chart and Insert in new Sheet as picture over the same location

Sub ChartsToPictures()
Dim chob As ChartObject
Dim pict As Shape
Dim shSource As Worksheet
Dim shTarget As Worksheet

Set shSource = ActiveSheet
Set shTarget = ActiveWorkbook.Worksheets.Add(Befo=shSource)

For Each chob In shSource.ChartObjects
chob.Chart.CopyPicture xlScreen, xlPicture, xlScreen
shTarget.Paste
Set pict = shTarget.Shapes(shTarget.Shapes.Count)
pict.Left = chob.Left
pict.Top = chob.Top
Next
End Sub


- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"TFriis" wrote in message
...
As topic says: I would like som VBA code, that runs through all charts
in activesheet and copy pastes them to a new sheet as pictures and
placed above the same cells...

Can any of you out there help me :)