Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Export Chart as TIFF or JPG

Embedded charts are the ones that are on a sheet, and you can select them
and move them around.

Chart sheets are the charts on a sheet without the rows and columns behind
them.

If you really have embedded charts, Ed's code will work. If you really have
chart sheets, then this code will work:

Charts("chart tab name").Export path & filename & ".PNG", FilterName:="PNG"

If you really have chart sheets, then the error is in your "Set
CurrentChart" statement.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
_______


"Webtechie" wrote in message
...
Ed,

1) The code does not work. I am using Office 2007. I changed the code
to
.png and the filtername to PNG. I get the same error.

2) I noticed you used ActiveChart. I am referencing excel charts that
are
embedded in a worksheet. They are Chart sheets and I am not selecting the
chart.

I actually set a chart variable:

Set CurrentChart = Sheets("chart").ChartObjects(1).Chart

Any ideas why this isn't working for me?


Tony


"Ed Ferrero" wrote:
Hi Webtechie,

What version of Excel are you using?

TIF export was available in XL 2000, but not 2003 or 2007
It does work in 2003 if you have installed both 2000 and 2003. Note that
you
need to run setup to install the required graphics filters, not all are
installed by default.

I would suggest you use PNG to use charts in Crystal Report. JPG is a
lossy
format.

Also, you need to change the file extension in your code for myFileName
as
well as the FilterName.

eg

ActiveChart.Export path & filename & ".PNG", FilterName:="PNG"

Ed Ferrero
www.edferrero.com




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
How do i export a pivot chart as a static chart object? James Charts and Charting in Excel 2 November 11th 08 10:05 PM
Chart.Export images are shrinking as I export more images Jared Charts and Charting in Excel 3 January 29th 08 03:23 AM
excel chart to tiff or eps format Raoul Charts and Charting in Excel 1 November 18th 06 05:22 AM
How to export Excel chart as tiff or bmp file? Michal Charts and Charting in Excel 3 June 28th 05 12:34 AM
export chart - what controls exported chart width Art Parra Excel Programming 2 December 6th 04 04:35 AM


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

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

About Us

"It's about Microsoft Excel"