ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Chart Export Issues (https://www.excelbanter.com/excel-programming/363004-chart-export-issues.html)

[email protected]

Chart Export Issues
 
This is a problem I've dealt with for some time. I try to use this
code to export a chart as a GIF file and from the postings I've read,
there have been no problems. However, everytime I try to run this it
gives me a Run Time error '1004' and I cannot figure out why. The
exact code as is below.

Fname = ThisWorkbook.Path & Application.PathSeparator & "Chart.gif"
Worksheets("Charts").ChartObjects(1).chart.Export Filename:=Fname,
FilterName:="GIF"

The two things I notice are that VB automatically puts a lowercase C on
chart and a lowercase N on Filename - I don't know what this indicates.

The Export function is in my object browser so it must be loaded in -
but it does not work.

What am I missing?


Tim Williams

Chart Export Issues
 
What's the error text (more useful than the number)

--
Tim Williams
Palo Alto, CA


wrote in message ups.com...
This is a problem I've dealt with for some time. I try to use this
code to export a chart as a GIF file and from the postings I've read,
there have been no problems. However, everytime I try to run this it
gives me a Run Time error '1004' and I cannot figure out why. The
exact code as is below.

Fname = ThisWorkbook.Path & Application.PathSeparator & "Chart.gif"
Worksheets("Charts").ChartObjects(1).chart.Export Filename:=Fname,
FilterName:="GIF"

The two things I notice are that VB automatically puts a lowercase C on
chart and a lowercase N on Filename - I don't know what this indicates.

The Export function is in my object browser so it must be loaded in -
but it does not work.

What am I missing?




Andy Pope

Chart Export Issues
 
Hi,

Are you sure you have the appropriate graphic filters loaded?

You can check using Control panel Add/Remove Programs and changing the
Office settings. for xl2003 at least they are in the Office Shared
Features Converters and Filters Graphic Filters.

Cheers
Andy

wrote:
This is a problem I've dealt with for some time. I try to use this
code to export a chart as a GIF file and from the postings I've read,
there have been no problems. However, everytime I try to run this it
gives me a Run Time error '1004' and I cannot figure out why. The
exact code as is below.

Fname = ThisWorkbook.Path & Application.PathSeparator & "Chart.gif"
Worksheets("Charts").ChartObjects(1).chart.Export Filename:=Fname,
FilterName:="GIF"

The two things I notice are that VB automatically puts a lowercase C on
chart and a lowercase N on Filename - I don't know what this indicates.

The Export function is in my object browser so it must be loaded in -
but it does not work.

What am I missing?


--

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


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com