J
John G
I have this code and it works but creates two gifs for each chart sheet in my
workbook. For example: One gif has the following correct name but no gif:
1BUS-GDP-Graph.gif
Second gif file of the same chart, wrong name (old dos?) but contains the gif:
1BUS-G~1.GIF
Sub Chartexporter()
Dim Cht As Chart
Dim Fname As String
For Each Cht In ActiveWorkbook.Charts
Fname = ThisWorkbook.Path & "\" & Cht.Name & ".gif"
Cht.Export Filename:=Fname, Filtername:="gif"
Next Cht
End Sub
workbook. For example: One gif has the following correct name but no gif:
1BUS-GDP-Graph.gif
Second gif file of the same chart, wrong name (old dos?) but contains the gif:
1BUS-G~1.GIF
Sub Chartexporter()
Dim Cht As Chart
Dim Fname As String
For Each Cht In ActiveWorkbook.Charts
Fname = ThisWorkbook.Path & "\" & Cht.Name & ".gif"
Cht.Export Filename:=Fname, Filtername:="gif"
Next Cht
End Sub