Ads by Google

Showing posts with label Export. Show all posts
Showing posts with label Export. Show all posts

Friday, May 15, 2009

Code to export chart as Image to local drive

You can export the chart to your desired location through following code:

Sub exportChart()
Dim cht as chart
Set Cht = Worksheets("Charts").ChartObjects(1).Chart Cht.Export Filename:="C:\Temp\MyChart.gif", FilterName:="GIF"
End Sub
---------------------
I use this code to export chart and load them as image in Userform which looks pretty good for presentation.