PC Review


Reply
Thread Tools Rate Thread

Copy Chart and Insert in new Sheet as picture over the same location

 
 
TFriis
Guest
Posts: n/a
 
      22nd Jan 2008
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 With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      22nd Jan 2008
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(Before:=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" <(E-Mail Removed)> wrote in message
news:8af549bd-50f8-4fcb-832b-(E-Mail Removed)...
> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set 'insert picture' default open location Jack B. Pollack Microsoft Excel Programming 4 10th Jan 2009 08:16 PM
Change default insert picture location Cameron Shaw Microsoft Powerpoint 0 10th Dec 2008 11:07 PM
Insert new Worksheet with name, and insert the sheet into itsalphabetical / numerical location S Davis Microsoft Excel Programming 0 12th May 2008 07:13 PM
copy charts & paste as picture, hide chart, size & place same picture as chart Gunnar Johansson Microsoft Excel Programming 3 30th Oct 2004 02:32 PM
unable to insert picture at the desired location Raja Gopal Microsoft Frontpage 0 1st Sep 2003 01:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:20 AM.