Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default copy charts & paste as picture, hide chart, size & place same picture as chart

Hi,

I have 15 charts in one worksheet and want to go through them and have them
all unvisible put instead show a picture of them.

I have now tried to much of my own and would be grateful to any help, parts
or in whole. I have this code right now, but get error on line W "=
chtobj.Width" . I feel that it will not be the last debug error in it, so
please help me...


Private Sub CopyChart()
Application.EnableEvents = False
Application.ScreenUpdating = True

Dim chtobj As ChartObject
Dim W As Double
Dim H As Double
Dim T As Double
Dim L As Double
Dim Pic As Image

For Each chtobj In Sheet1.ChartObjects
W = chtobj.Width
H = chtobj.Height
L = chtobj.Left
T = chtobj.Top
chtobj.Visible = False
chtobj.CopyPicture Appearance:=xlScreen, Format:=xlPicture
ActiveSheet.Pictures.Paste.Select
With Selection
.Width = W
.Height = H
.Left = L
.Top = T
End With
Next chtobj

Application.EnableEvents = False
Application.ScreenUpdating = True
Exit Sub

/Regards


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
VBA Copy Chart as Picture Steph Charts and Charting in Excel 3 April 23rd 23 11:47 AM
Saving chart as picture - how to maintain the same size of the fil Martin Charts and Charting in Excel 3 February 22nd 08 06:03 PM
Copy and Paste Chart as Picture into another workbook or worksheet SteveC Charts and Charting in Excel 1 February 15th 07 11:47 PM
Excel 2007 copy chart as picture ward376 Charts and Charting in Excel 3 June 2nd 06 09:48 PM
Want to place picture in top left corner of chart PeterQ Charts and Charting in Excel 1 February 13th 06 11:00 PM


All times are GMT +1. The time now is 11:49 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"