Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rui Rui is offline
external usenet poster
 
Posts: 7
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
Rui Rui is offline
external usenet poster
 
Posts: 7
Default 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




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
Macro Problem John Calder New Users to Excel 1 June 2nd 09 02:06 AM
Problem with Macro Kumar Excel Discussion (Misc queries) 7 April 21st 09 10:45 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
Macro problem tweacle Excel Worksheet Functions 0 February 15th 06 08:26 PM


All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"