PC Review


Reply
Thread Tools Rate Thread

CopyPicture on a Shapes range

 
 
Kevin Beckham
Guest
Posts: n/a
 
      4th Aug 2008
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
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      4th Aug 2008
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
 
Reply With Quote
 
Kevin Beckham
Guest
Posts: n/a
 
      5th Aug 2008
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
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      5th Aug 2008
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
 
Reply With Quote
 
Kevin Beckham
Guest
Posts: n/a
 
      6th Aug 2008
Under xl2007, it gives the following error message: "The item with the
specified name wasn't found"

I re-evaluated what I wanted to do - the solution was to have a single graph
with two different chart types, with secondary axes and a macro to ensure
the xlValues maximum scale was the same for both axes.

"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
>

 
Reply With Quote
 
Kevin Beckham
Guest
Posts: n/a
 
      6th Aug 2008
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
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      6th Aug 2008
Glad you found a workaround.

Kevin Beckham wrote:
>
> 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
> >


--

Dave Peterson
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CopyPicture method of range class failed using RangeName CG Microsoft Excel Programming 5 8th Nov 2010 04:55 PM
CopyPicture from Excel Range to Power Point MatsN Microsoft Excel Programming 0 21st Mar 2010 04:10 PM
Range CopyPicture() GS80 Microsoft Excel Charting 8 30th Jan 2008 03:41 PM
Range.copyPicture behaves differently?? =?Utf-8?B?bXJteWVycw==?= Microsoft Excel Programming 0 26th Apr 2007 07:46 PM
Range Object CopyPicture Method; Paste to MS Word =?Utf-8?B?TWFyaWFu?= Microsoft Excel Programming 0 12th Jul 2006 04:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:35 AM.