ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   macro problem (https://www.excelbanter.com/excel-programming/332532-macro-problem.html)

Rui

macro problem
 
Hi,

i´m trying to copy a selection of charts from a workbook to another. Here´s
my lines:

Windows("BDs.xls").Activate
ActiveSheet.ChartObjects("Chart 11").Activate
ActiveSheet.Shapes.Range(Array("Chart 11", "Chart 12", "Chart 13",
"Chart 14" _
, "Chart 15", "Chart 16")).Select
Selection.Copy
Windows(F).Activate
ActiveSheet.PasteSpecial Format:="Picture (Enhanced Metafile)",
Link:=False _
, DisplayAsIcon:=False

When i see the macro running, it appears that only copies the first chart,
and then
it bugs when tries to paste in the workbook "F"

can anyone help me?
thanks,
Rui


Tom Ogilvy

macro problem
 
copy then one at a time and past as a picture or select the entire range
that contains the charts (not the charts) and copy and paste as a picture

--
Regards,
Tom Ogilvy

"Rui" wrote in message
...
Hi,

i´m trying to copy a selection of charts from a workbook to another.

Here´s
my lines:

Windows("BDs.xls").Activate
ActiveSheet.ChartObjects("Chart 11").Activate
ActiveSheet.Shapes.Range(Array("Chart 11", "Chart 12", "Chart 13",
"Chart 14" _
, "Chart 15", "Chart 16")).Select
Selection.Copy
Windows(F).Activate
ActiveSheet.PasteSpecial Format:="Picture (Enhanced Metafile)",
Link:=False _
, DisplayAsIcon:=False

When i see the macro running, it appears that only copies the first chart,
and then
it bugs when tries to paste in the workbook "F"

can anyone help me?
thanks,
Rui




Rui

macro problem
 
that may work. i´ll give it a try.
probably it will be slower, but no harm done!

thanks tom
rui

"Tom Ogilvy" wrote:

copy then one at a time and past as a picture or select the entire range
that contains the charts (not the charts) and copy and paste as a picture

--
Regards,
Tom Ogilvy

"Rui" wrote in message
...
Hi,

i´m trying to copy a selection of charts from a workbook to another.

Here´s
my lines:

Windows("BDs.xls").Activate
ActiveSheet.ChartObjects("Chart 11").Activate
ActiveSheet.Shapes.Range(Array("Chart 11", "Chart 12", "Chart 13",
"Chart 14" _
, "Chart 15", "Chart 16")).Select
Selection.Copy
Windows(F).Activate
ActiveSheet.PasteSpecial Format:="Picture (Enhanced Metafile)",
Link:=False _
, DisplayAsIcon:=False

When i see the macro running, it appears that only copies the first chart,
and then
it bugs when tries to paste in the workbook "F"

can anyone help me?
thanks,
Rui






All times are GMT +1. The time now is 03:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com