Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.charting,microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
WHY IS THE OFFICE CLIPBOARD NOT LETTING ME COPY AND PASTE? | Excel Discussion (Misc queries) | |||
Clear Clipboard after Copy | Excel Discussion (Misc queries) | |||
copy to the clipboard and into another workbook | Excel Discussion (Misc queries) | |||
Error can't empty clipboard appears when trying to copy. | Excel Discussion (Misc queries) | |||
Can't copy without clipboard open | Excel Discussion (Misc queries) |