Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Feb 2001
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Saving a chart to a file (97/SR1)

    Hi,

    Would anyone know how to save an Excel chart to a file in the format of gif or jpg?

    Cheers.

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Saving a chart to a file (97/SR1)

    The following should export chart no 1 on the the active sheet to a Giff file <pre>Sub ChartExport()
    ActiveSheet.ChartObjects(1).Chart.Export _
    Filename:="Chart1.Gif", _
    FilterName:="Gif"
    End Sub</pre>


    Andrew C

  3. #3
    Star Lounger
    Join Date
    Feb 2001
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving a chart to a file (97/SR1)

    Hi Andrew,

    Could I modify this code to accept the ACTIVE CHART rather than chart number 1 or 2?

    Cheers.

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Saving a chart to a file (97/SR1)

    The followung should do it :<pre> Sub ActiveChartToGif()
    ActiveChart.Export Filename:="ChartX.Gif", FilterName:="Gif"
    End Sub</pre>

    Andrew

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •