Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default CopyPicture on a Shapes range

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default CopyPicture on a Shapes range

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default CopyPicture on a Shapes range

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default CopyPicture on a Shapes range

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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default CopyPicture on a Shapes range

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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default CopyPicture on a Shapes range

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

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default CopyPicture on a Shapes range

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
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
Delete shapes in a range Pam Excel Programming 3 July 18th 08 05:56 PM
Range CopyPicture() GS80 Charts and Charting in Excel 8 January 30th 08 03:41 PM
Range.copyPicture behaves differently?? mrmyers Excel Programming 0 April 26th 07 07:46 PM
Range Object CopyPicture Method; Paste to MS Word Marian Excel Programming 0 July 12th 06 04:31 PM
Shapes Range Array Bubb Excel Discussion (Misc queries) 1 April 10th 06 11:51 PM


All times are GMT +1. The time now is 03:36 AM.

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

About Us

"It's about Microsoft Excel"