Jump to content

Save a chart as a GIF file


Rbreb13
 Share

Recommended Posts

Save a chart as a GIF file

You can save selected charts as GIF files using the following macro:

Sub savechart()

If TypeName(Selection) = "ChartArea" Then

userFname = InputBox("Filename of chart" _

& " file?", "Save chart", "excelchart")

If userFname = "" Then Exit Sub

userNameAndPath = ThisWorkbook.Path & "\" & userFname & ".gif"

ActiveChart.Export Filename:=userNameAndPath, FilterName:="GIF"

MsgBox "Chart is saved as" & Chr(13) & userNameAndPath

Else

userReply = MsgBox("Please select a Chart Area, " _

& "then run macro again", vbOKOnly, "Error in selection")

End If

End Sub

After you've written the macro, you must save your Excel workbook. Now click on the chart area and run the macro. After you name the file, the chart will be saved to the same folder as the workbook.

Link to comment
Share on other sites

Another simple way to save a chart as an image file is:

(this is how I do all the charts on COD)

1. Select the chart

2. Ctrl-C

3. Open your favorite picture editor, whether it be paint or something else. I prefer Photoshope for many reasons, but also because it will automatically size you canvas to what ever you have in your clipboard.

4. Paste

5. Save as whatever you want.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...