Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting Chart as GIF (Excel2000)

Status
Not open for further replies.

Irishize

Programmer
Aug 9, 2002
2
US
Hi,
I have an intermittent problem with exporting charts as GIF files. My macro does the following:

* opens a txt file
* formats it
* copies the data onto the master sheet
* closes the txt file
* then exports the charts.

I had an initial problem with a 'do you want to leave information on the clipboard' dialogue when closing the first sheet.

I have since solved this by using
Sendkeys '{ESC}', False
just after the workbook is closed.

Since solving that problem, I occasionaly get an error when exporting a chart ('Method "Export" of object "_chart" failed') when it gets as far as
ActiveChart.Export Filename:="F:\Web\Updated_Graphics\Activity_Chart.gif", FilterName:="GIF"

Any workarounds for this?

Cheers! ;-)
 
Instead of using sendkeys, try using
Application.cutcopymode = false

Dunno if this'll help but I try to use sendkeys as little aspossible 'cos you're never quite sure whether they're operating in the right place 100% of the time - it may be that the sendkeys command is making that export code fall over in certain circumstances Rgds
~Geoff~
 
Thanks xlbo,
I will use that in future.

Cheers,
Irishize
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top