Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 43
Default Control size of chart - CopyPicture

Hi again,

I'm trying to use VBA to:

- copy a chart in a chart sheet
- paste it as an embedded chart in a new sheet
- resize (and format) the chart
- copy the embedded chart to the clipboard
- delete the new sheet

This is the code I've come up with so far:

Sub CopyChart()
ActiveChart.ChartArea.Select
ActiveChart.ChartArea.Copy
ActiveWorkbook.Sheets.Add
ActiveSheet.Paste
ActiveSheet.ChartObjects("Chart 1").Activate
With ActiveChart.Parent
.Height = 252.75
.Width = 342.75
ActiveChart.PlotArea.Height = 205
ActiveChart.PlotArea.Width = 340
ActiveChart.ChartArea.Copy
Application.DisplayAlerts = False
ActiveSheet.Delete
Application.DisplayAlerts = True
End With
End Sub

The problem is: when the ActiveSheet is deleted, the copied chart is
no longer available on the clipboard. I can use the CopyPicture method
in stead, but then there will be a different size when pasted in
another application.

--
Fredrik E. Nilsen
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
Calendar control font size Rob Excel Discussion (Misc queries) 0 August 1st 06 01:39 AM
control textboxes keep changing size Jimbolina Excel Discussion (Misc queries) 1 November 8th 05 05:49 AM
Control Size of Scatter Chart Symbol Bill Sturdevant Charts and Charting in Excel 1 June 27th 05 11:14 PM
font size changes w/ control focus mark kubicki Excel Worksheet Functions 0 June 17th 05 06:00 PM
CopyPicture ????? Paul Smith Charts and Charting in Excel 3 February 15th 05 10:49 PM


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