Exporting a chart

smund

Board Regular
Joined
Mar 15, 2005
Messages
52
In my test.xls I have a sheet(Chart1) and I need to do a macro to export the chart and save as *.gif.
Can you help me?
 

Some videos you may like

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

indiantrix

Well-known Member
Joined
Oct 17, 2002
Messages
943
I have little experience with macros. However, if I had a chart on its own sheet and wanted to put it into, say, a Word Document, I would:
1. Select the chart so it had the squares in each corner
2. Hold down my Shift Key
3. Click Edit/Copy Picture
4. Click OK.
5. Go to Word Doc and Edit/Paste Special, Picture.
Hope this can help you.
Anyone else?
Larry
 

NdNoviceHlp

Well-known Member
Joined
Nov 9, 2002
Messages
2,508
Dim "Fname" as string. HTH. Dave
Code:
Fname = ThisWorkbook.Path & "\" & "Yourfilename.gif"
ActiveChart.Export Filename:=Fname, FilterName:="GIF"
 

Watch MrExcel Video

Forum statistics

Threads
1,109,428
Messages
5,528,698
Members
409,830
Latest member
KT50

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top