W
Webtechie
Hello,
I wrote an application with Excel and VBA to create charts and then export
them as GIF. Works great. However, I then need to create a report. Crystal
Reports does not support GIF.
I need to change the code to export to TIFF or JPG. I thought I could, but
am getting an error.
Could someone please let me know how to export a chart to TIFF or JPG?
Thanks.
Here is my current code:
Set CurrentChart = Sheets("chart").ChartObjects(1).Chart
myFileName = ThisWorkbook.path & "\images\" & reviewFileName & "_" &
mPageNameStr & "_ch1.gif"
If Not FileExists(myFileName) Or iChartFlag = "Y" Then
CurrentChart.Export FileName:=myFileName, FilterName:="GIF"
End If
Me.Image1.Picture = LoadPicture(myFileName)
This works great. I tried changing GIF to TIFF or JPG. I get this error
message.
The specified dimension is not valid for the current chart type. ??!!
Thanks,
Tony
I wrote an application with Excel and VBA to create charts and then export
them as GIF. Works great. However, I then need to create a report. Crystal
Reports does not support GIF.
I need to change the code to export to TIFF or JPG. I thought I could, but
am getting an error.
Could someone please let me know how to export a chart to TIFF or JPG?
Thanks.
Here is my current code:
Set CurrentChart = Sheets("chart").ChartObjects(1).Chart
myFileName = ThisWorkbook.path & "\images\" & reviewFileName & "_" &
mPageNameStr & "_ch1.gif"
If Not FileExists(myFileName) Or iChartFlag = "Y" Then
CurrentChart.Export FileName:=myFileName, FilterName:="GIF"
End If
Me.Image1.Picture = LoadPicture(myFileName)
This works great. I tried changing GIF to TIFF or JPG. I get this error
message.
The specified dimension is not valid for the current chart type. ??!!
Thanks,
Tony