Further trials showed that
ActiveSheet.Shapes.Range(Array("Chart 27", "Chart 9")).Select
Selection.Copy
does work. It then requires the subsequent paste to use PasteSpecial and to
select Picture (JPEG) or similar (but not the default paste, otherwise the
charts are pasted separately, not as an overlay)
"Dave Peterson" wrote:
> How about:
>
> ActiveSheet.ChartObjects(Array("Chart 27", "Chart 9")).CopyPicture
>
> It worked in xl2003. I didn't test in xl2007.
>
> Kevin Beckham wrote:
> >
> > Thanks for the try, but it doesn't work - Error 438 - Object doesn't support
> > this property or method
> >
> > Kevin
> >
> > "Dave Peterson" wrote:
> >
> > > xl2007 has trouble with shapes and .select
> > >
> > > I'd try:
> > >
> > > ActiveSheet.Shapes.Range(Array("Chart 27", "Chart 9")).copypicture
> > >
> > > (but I didn't actually try it!)
> > >
> > > Kevin Beckham wrote:
> > > >
> > > > I have a graph overlaying another and want to copy them together. The
> > > > following code snippet worked in Excel 2003
> > > >
> > > > ActiveSheet.Shapes.Range(Array("Chart 27", "Chart 9")).Select
> > > > Selection.CopyPicture
> > > >
> > > > but doesn't work now. Has there been a syntax change or is it no longer
> > > > supported?
> > > >
> > > > Kevin Beckham
> > >
> > > --
> > >
> > > Dave Peterson
> > >
>
> --
>
> Dave Peterson
>
|