export chart method error - excel2003

A

Art Parra

The following method fails on 2003 but runs ok on 2000.

activechart.export filename:=myfilename, filtername:="GIF"

I get a runtime 1004 error: method export of object chart failed


thanks,
 
N

NickHK

Art,
If you are not on an English system, as Peter T pointed out recently, "GIF"
may fail. A workaround is

Dim MyFileName As String

MyFileName = "C:\GifTest.gif" 'Make sure the filename has the extension
ActiveChart.Export Filename:=MyFileName , filtername:=""
Also, the Interactive argument seems to have no effect.

This works in XL2000/2002, not sure about 2003.

NickHK
 
P

Peter T

Just to add, the filter appears to default to that of the extension, eg
..gif, .jpg, ,jpeg, .tiff.

Though for some reason I can't seem to save as .bmp

Regards,
Peter T
 
J

Jon Peltier

Peter -

You're right. I must have made up that "GIF" as default filter thing.
Apparently the filter name is only needed if the extension is not
recognized.

I couldn't save BMP or TIFF, but when I installed 2007 along with 2003 on
another machine, neither Excel could export a chart. Removing 07, deleting
all the image filters, and reinstalling 03 fixed it.

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top