Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Saving chart templates - xl 2007 (and 2010?) | Charts and Charting in Excel | |||
Excel 2007 Emailed chart issue | Charts and Charting in Excel | |||
Chart printing issue in Excel 2007 | Charts and Charting in Excel | |||
Excel 2007, log chart issue | Charts and Charting in Excel | |||
Chart allignment issue in 2007 but in 2003 its working fine | Charts and Charting in Excel |