Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default CopyPicture ?????

What on earth is happening with th code below??????

The code works fine, copying a chartobject and pasting it into a new
location. The problem is that while the chart area is the same size, only
two thirds of the image is copied.

I will say that I have stretched the plot area of the original, it itself
does not behave strangely.

I have no idea what the problem is, does any one else?


Code Snippet:
ThisWorkbook.Activate

Worksheets("Summary").Activate

Range("A30").Select

ActiveSheet.ChartObjects("First Chart").CopyPicture xlScreen, xlBitmap

Workbooks(TargetWB).Activate

Worksheets("Summary").Activate

Range("A31").Select

ActiveSheet.Paste


  #2   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel.programming
external usenet poster
 
Posts: 235
Default CopyPicture ?????

Paul, would this revision work for you? It assumes you don't need the
reference to the .bmp file to copy the pictu

Sub CopyChart()
ActiveSheet.ChartObjects("First Chart").Activate
ActiveChart.ChartArea.Select
ActiveChart.CopyPicture Appearance:=xlPrinter, Size:=xlScreen, Format:= _
xlPicture
Range("A31").Select
ActiveSheet.Pictures.Paste.Select
End Sub

----
Regards,
John Mansfield
http://www.pdbook.com

"Paul Smith" wrote:

What on earth is happening with th code below??????

The code works fine, copying a chartobject and pasting it into a new
location. The problem is that while the chart area is the same size, only
two thirds of the image is copied.

I will say that I have stretched the plot area of the original, it itself
does not behave strangely.

I have no idea what the problem is, does any one else?


Code Snippet:
ThisWorkbook.Activate

Worksheets("Summary").Activate

Range("A30").Select

ActiveSheet.ChartObjects("First Chart").CopyPicture xlScreen, xlBitmap

Workbooks(TargetWB).Activate

Worksheets("Summary").Activate

Range("A31").Select

ActiveSheet.Paste



  #3   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default CopyPicture ?????

John,

Thanks for your suggestion but it makes no difference.

The problem seems to be when the charts is stretched wider than a certain
ratio of the original.

This problem is very very frustrating, so if anyone else has any solution
please let me know.

Paul Smith




"John Mansfield" wrote in message
...
Paul, would this revision work for you? It assumes you don't need the
reference to the .bmp file to copy the pictu

Sub CopyChart()
ActiveSheet.ChartObjects("First Chart").Activate
ActiveChart.ChartArea.Select
ActiveChart.CopyPicture Appearance:=xlPrinter, Size:=xlScreen, Format:=
_
xlPicture
Range("A31").Select
ActiveSheet.Pictures.Paste.Select
End Sub

----
Regards,
John Mansfield
http://www.pdbook.com

"Paul Smith" wrote:

What on earth is happening with th code below??????

The code works fine, copying a chartobject and pasting it into a new
location. The problem is that while the chart area is the same size,
only
two thirds of the image is copied.

I will say that I have stretched the plot area of the original, it itself
does not behave strangely.

I have no idea what the problem is, does any one else?


Code Snippet:
ThisWorkbook.Activate

Worksheets("Summary").Activate

Range("A30").Select

ActiveSheet.ChartObjects("First Chart").CopyPicture xlScreen, xlBitmap

Workbooks(TargetWB).Activate

Worksheets("Summary").Activate

Range("A31").Select

ActiveSheet.Paste





  #4   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel.programming
external usenet poster
 
Posts: 146
Default CopyPicture ?????

Paul -

The PowerPoint FAQ calls it a problem when Excel content is pasted into
PowerPoint, but I think it can happen just in Excel. This page has some
info about it:

http://www.rdpslides.com/pptfaq/FAQ00068.htm

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Paul Smith wrote:

John,

Thanks for your suggestion but it makes no difference.

The problem seems to be when the charts is stretched wider than a certain
ratio of the original.

This problem is very very frustrating, so if anyone else has any solution
please let me know.

Paul Smith




"John Mansfield" wrote in message
...

Paul, would this revision work for you? It assumes you don't need the
reference to the .bmp file to copy the pictu

Sub CopyChart()
ActiveSheet.ChartObjects("First Chart").Activate
ActiveChart.ChartArea.Select
ActiveChart.CopyPicture Appearance:=xlPrinter, Size:=xlScreen, Format:=
_
xlPicture
Range("A31").Select
ActiveSheet.Pictures.Paste.Select
End Sub

----
Regards,
John Mansfield
http://www.pdbook.com

"Paul Smith" wrote:


What on earth is happening with th code below??????

The code works fine, copying a chartobject and pasting it into a new
location. The problem is that while the chart area is the same size,
only
two thirds of the image is copied.

I will say that I have stretched the plot area of the original, it itself
does not behave strangely.

I have no idea what the problem is, does any one else?


Code Snippet:
ThisWorkbook.Activate

Worksheets("Summary").Activate

Range("A30").Select

ActiveSheet.ChartObjects("First Chart").CopyPicture xlScreen, xlBitmap

Workbooks(TargetWB).Activate

Worksheets("Summary").Activate

Range("A31").Select

ActiveSheet.Paste






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
Range CopyPicture() GS80 Charts and Charting in Excel 8 January 30th 08 03:41 PM
CopyPicture ????? Paul Smith Charts and Charting in Excel 3 February 15th 05 10:49 PM
Copypicture method failed Kamal[_5_] Excel Programming 2 April 22nd 04 11:31 AM
CopyPicture is giving problem Ahmed Iftikhar Excel Programming 1 April 6th 04 10:56 PM
CopyPicture Remi Excel Programming 7 November 12th 03 05:25 PM


All times are GMT +1. The time now is 11:37 PM.

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"