Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.charting
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calendar control font size | Excel Discussion (Misc queries) | |||
control textboxes keep changing size | Excel Discussion (Misc queries) | |||
Control Size of Scatter Chart Symbol | Charts and Charting in Excel | |||
font size changes w/ control focus | Excel Worksheet Functions | |||
CopyPicture ????? | Charts and Charting in Excel |