Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Exporting Charts as GIFs

Hey all I asked this a couple years ago and got this script
essentially:

Sub exportChartAsImage()
Dim myWidth As Double
Dim myHeight As Double
ActiveChart.PlotArea.Select
Selection.ClearFormats
'Resizes the Chart For the Web Image
myWidth = 1024 ' or your desired GIF width in pixels
myHeight = 768 ' or your desired GIF height in pixels
ActiveChart.Parent.Width = myWidth * 0.75
ActiveChart.Parent.Height = myHeight * 0.75
'Exports the GIF File
ActiveChart.Export "C:\Documents and
Settings\Adam\Desktop\Chart.gif", "GIF"
End Sub


which is great BUT I need to also be able to export charts
that are on their own sheet and are not objects in a
spreadsheet.

Is this possible to do? TIA!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Exporting Charts as GIFs

Chart1.Select
ActiveChart.Export "C:\Documents and
Settings\Adam\Desktop\Chart.gif", "GIF"


--
Regards,
Tom Ogilvy


"Adam Sparks" wrote in message
...
Hey all I asked this a couple years ago and got this script
essentially:

Sub exportChartAsImage()
Dim myWidth As Double
Dim myHeight As Double
ActiveChart.PlotArea.Select
Selection.ClearFormats
'Resizes the Chart For the Web Image
myWidth = 1024 ' or your desired GIF width in pixels
myHeight = 768 ' or your desired GIF height in pixels
ActiveChart.Parent.Width = myWidth * 0.75
ActiveChart.Parent.Height = myHeight * 0.75
'Exports the GIF File
ActiveChart.Export "C:\Documents and
Settings\Adam\Desktop\Chart.gif", "GIF"
End Sub


which is great BUT I need to also be able to export charts
that are on their own sheet and are not objects in a
spreadsheet.

Is this possible to do? TIA!



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Exporting Charts as GIFs

I thought it was something along those lines but wasn't
having much luck with it.

Thanks much Tom!

regards,
Adam Sparks

-----Original Message-----
Chart1.Select
ActiveChart.Export "C:\Documents and
Settings\Adam\Desktop\Chart.gif", "GIF"


--
Regards,
Tom Ogilvy


"Adam Sparks" wrote in message
...
Hey all I asked this a couple years ago and got this script
essentially:

Sub exportChartAsImage()
Dim myWidth As Double
Dim myHeight As Double
ActiveChart.PlotArea.Select
Selection.ClearFormats
'Resizes the Chart For the Web Image
myWidth = 1024 ' or your desired GIF width in pixels
myHeight = 768 ' or your desired GIF height in pixels
ActiveChart.Parent.Width = myWidth * 0.75
ActiveChart.Parent.Height = myHeight * 0.75
'Exports the GIF File
ActiveChart.Export "C:\Documents and
Settings\Adam\Desktop\Chart.gif", "GIF"
End Sub


which is great BUT I need to also be able to export charts
that are on their own sheet and are not objects in a
spreadsheet.

Is this possible to do? TIA!



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Exporting Charts as GIFs

This give's me an Error message: "Object Required" on the
Chart1.select

:?

Adam
-----Original Message-----
Chart1.Select
ActiveChart.Export "C:\Documents and
Settings\Adam\Desktop\Chart.gif", "GIF"


--
Regards,
Tom Ogilvy


"Adam Sparks" wrote in message
...
Hey all I asked this a couple years ago and got this script
essentially:

Sub exportChartAsImage()
Dim myWidth As Double
Dim myHeight As Double
ActiveChart.PlotArea.Select
Selection.ClearFormats
'Resizes the Chart For the Web Image
myWidth = 1024 ' or your desired GIF width in pixels
myHeight = 768 ' or your desired GIF height in pixels
ActiveChart.Parent.Width = myWidth * 0.75
ActiveChart.Parent.Height = myHeight * 0.75
'Exports the GIF File
ActiveChart.Export "C:\Documents and
Settings\Adam\Desktop\Chart.gif", "GIF"
End Sub


which is great BUT I need to also be able to export charts
that are on their own sheet and are not objects in a
spreadsheet.

Is this possible to do? TIA!



.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Exporting Charts as GIFs

You would need a chart sheet that has a codename of Chart1

you can use anything that gets the a reference to a chart object (not
chartobject)

Charts(1).Select
Charts("Chart1").Select

activesheet.ChartObjects(1).Select

--
Regards,
Tom Ogilvy

wrote in message
...
This give's me an Error message: "Object Required" on the
Chart1.select

:?

Adam
-----Original Message-----
Chart1.Select
ActiveChart.Export "C:\Documents and
Settings\Adam\Desktop\Chart.gif", "GIF"


--
Regards,
Tom Ogilvy


"Adam Sparks" wrote in message
...
Hey all I asked this a couple years ago and got this script
essentially:

Sub exportChartAsImage()
Dim myWidth As Double
Dim myHeight As Double
ActiveChart.PlotArea.Select
Selection.ClearFormats
'Resizes the Chart For the Web Image
myWidth = 1024 ' or your desired GIF width in pixels
myHeight = 768 ' or your desired GIF height in pixels
ActiveChart.Parent.Width = myWidth * 0.75
ActiveChart.Parent.Height = myHeight * 0.75
'Exports the GIF File
ActiveChart.Export "C:\Documents and
Settings\Adam\Desktop\Chart.gif", "GIF"
End Sub


which is great BUT I need to also be able to export charts
that are on their own sheet and are not objects in a
spreadsheet.

Is this possible to do? TIA!



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting excel charts with form controls (spinner) to Powerpoint Mike B Charts and Charting in Excel 1 November 18th 07 04:10 PM
exporting charts chico Charts and Charting in Excel 4 January 17th 07 10:24 AM
Automatically resize excel charts when exporting them to PowerPoin mustang25 Charts and Charting in Excel 2 May 20th 06 07:10 AM
Exporting Excel Charts in Separate Tabs excelnewbie Excel Discussion (Misc queries) 0 April 20th 05 03:59 PM
e-mailing or exporting charts as a .pdf or .tif format Brad Charts and Charting in Excel 5 January 25th 05 04:27 AM


All times are GMT +1. The time now is 05:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"