View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Andy Pope Andy Pope is offline
external usenet poster
 
Posts: 2,489
Default Save as JPG or PNG

Hi,

You can copy the range and paste in within the chart before exporting.
Something like this

' chart data
Range("B2:C6").CopyPicture xlScreen
With ActiveChart
.Paste
.Export "C:\temp\pic1.gif", "gif"
End With
'ActiveChart.Export Filename:= _
' MyFiles.BuildPath(ScansPath, TestNumber) & " " _
' & RunNumber & ".png", FilterName:="PNG"

Cheers
Andy

Spike wrote:
Is there any way to save a range/selection of excel cells as a jpg or png or
any picture format.

I have a graph on an excel page, and i want the jpg to also contains the
information in the cells about it.

I know how to save the chart by itself....
ActiveChart.Export Filename:=MyFiles.BuildPath(ScansPath, TestNumber) & " "
& RunNumber & ".png", FilterName:="PNG"

But have no idea how to print/export a page to a picture format.

Any help at all would be great, thanks,


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info