ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Save chart as .BMP instead of .GIF? (https://www.excelbanter.com/charts-charting-excel/240325-save-chart-bmp-instead-gif.html)

Fan924

Save chart as .BMP instead of .GIF?
 
Can this be modified to save a .BMP instead of .GIF?

Sub Save_ChartAsGif()
Dim oCht As Chart
Set oCht = ActiveChart
'ActiveSheet.Name
On erRROR GoTo Err_Chart
oCht.Export FileName:="D:\My Documents\_wip\Pic_" & ActiveSheet.Name
&
".gif", Filtername:="gif"
'oCht.Export FileName:="C:\PopularICON.jpg", Filtername:="JPG"
Err_Chart:
If Err < 0 Then
Debug.Print Err.Description
Err.Clear
End If
End Sub

Andy Pope

Save chart as .BMP instead of .GIF?
 
Hi,

If you have xl2007 then .bmp is supported. Here is some more information
about graphics filters.
http://office.microsoft.com/en-us/pu...CH100487811033

Here a blog on the merits of graphic type.
http://peltiertech.com/WordPress/ima...ported-charts/

You might also have a look at Stephen Bullen's PastePicture workbook.
http://www.oaltd.co.uk/Excel/Default.htm

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Fan924" wrote in message
...
Can this be modified to save a .BMP instead of .GIF?

Sub Save_ChartAsGif()
Dim oCht As Chart
Set oCht = ActiveChart
'ActiveSheet.Name
On erRROR GoTo Err_Chart
oCht.Export FileName:="D:\My Documents\_wip\Pic_" & ActiveSheet.Name
&
".gif", Filtername:="gif"
'oCht.Export FileName:="C:\PopularICON.jpg", Filtername:="JPG"
Err_Chart:
If Err < 0 Then
Debug.Print Err.Description
Err.Clear
End If
End Sub




All times are GMT +1. The time now is 02:33 AM.

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