Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Copy Chart and Insert in new Sheet as picture over the same location

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 :)
  #2   Report Post  
Posted to microsoft.public.excel.programming
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 :)



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I allow insert picture in sheet when it is protected Darshan Excel Discussion (Misc queries) 0 March 10th 07 11:55 AM
insert picture into protected sheet justlearnin Excel Discussion (Misc queries) 0 October 2nd 06 04:25 PM
Insert picture into protected sheet ZipCurs Excel Programming 4 September 3rd 06 02:24 PM
Need macro to insert chart w/ FIXED size & location Matt[_33_] Excel Programming 2 October 4th 05 10:25 PM
copy charts & paste as picture, hide chart, size & place same picture as chart Gunnar Johansson Excel Programming 0 October 30th 04 01:22 AM


All times are GMT +1. The time now is 03:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"