Sub SaveAsGIF()
' Saves the active chart as a GIF file
' Prompts for a file name and directory
Dim FileName As Variant
If ActiveChart Is Nothing Then
MsgBox "Select a chart to export."
Else
FileName = Application.GetSaveAsFilename( _
InitialFileName:=ActiveChart.Name & ".gif", _
FileFilter:="GIF Files (*.gif), *.gif", _
Title:="Save chart as GIF file")
If FileName <> False Then ActiveChart.Export FileName, "GIF"
End If
End Sub
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.