Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Chart issue--works in 2007, not in 2010

I have an application that creates a chart, exports said chart as .gif, creates a sheet in another workbook, and inserts the .gif into that sheet.

Here's the code.

Sheets("CHART").Select
Dim mychart1 As Chart
Set mychart1 = ActiveChart
mychart1.Export Filename:="c:\Chart.gif", FilterName:="GIF"
'Paste the chart into the Archive File
Dim mainBook As String
mainBook = ActiveWorkbook.Name
Windows("GifBook.xls").Activate
Sheets(1).Select
Sheets.Add
Range("A1").Select
ActiveSheet.Pictures.Insert("C:\Chart.gif").Select

From there, the code takes in new data, overwrites the old chart, and re-executes the code above. I end up with GifBook.xls having all the charts I need, as .gifs, one on each sheet in the workbook.

All that stuff works peachy in Excel 2007. I can save the GifBook file, and all the charts (pages of them) are there when I reopen it.

If I run the code in Excel 2010, I see GifBook with all the charts as well. But if I save it and reopen it...I get properly named pages that are ALL populated with the first chart I inserted into the sheet. All sheets have the same chart.

It's a bit baffling, but perhaps someone has a solution? I tried saving as .xlsx and copying the sheets into yet another workbook one by one.

Thanks much.
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
Saving chart templates - xl 2007 (and 2010?) Reg Charts and Charting in Excel 0 January 13th 10 03:36 PM
Excel 2007 Emailed chart issue TeresaD Charts and Charting in Excel 0 March 30th 09 06:02 PM
Chart printing issue in Excel 2007 Nancy S Charts and Charting in Excel 0 February 11th 09 10:50 PM
Excel 2007, log chart issue Newsx Charts and Charting in Excel 10 August 23rd 08 06:55 PM
Chart allignment issue in 2007 but in 2003 its working fine Venkatesh Charts and Charting in Excel 0 March 18th 08 12:38 PM


All times are GMT +1. The time now is 09:46 PM.

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

About Us

"It's about Microsoft Excel"