The chart that was not there

  • Thread starter Thread starter TSH
  • Start date Start date
T

TSH

I once opened a large xls file, and plotted the data in it.
On close it said that the chart is too big and will be truncated. I said OK.
Since then on certain OTHER xls files which are much smaller and have NO
chart on them, on close and save I get the SAME message, and it always comes
up twice.
The size of the file also seems to be quite a bit bigger than they should
be.

Is that chart fromthe first file somehow stuck and hidden in these other
files?
How can I check and/or get rid of it.

Thanks,
Ernesto
 
I've never seen a chart jump to another workbook like this, but if you have
charts in a workbook, you could delete them with something like:

Option Explicit
Sub testme()

Dim wks As Worksheet
Dim sh As Object

For Each wks In ActiveWorkbook.Worksheets
wks.ChartObjects.Delete
Next wks

Application.DisplayAlerts = False
For Each sh In ActiveWorkbook.Sheets
If TypeName(sh) = "Chart" Then
sh.Delete
End If
Next sh
Application.DisplayAlerts = True

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
I tried what you said but assuming I did it right, it did not work.
In case you care to look at the problem I've posted a sample file which does
not have a chart in it, but thinks it does
and it is much larger than it should be:

www.mathllc.com/genericHOG.import.zip

I will appreciate any further hints.

---------------------------------
 
I don't open attachments or download workbooks.

(And if it's as large as you say, I wouldn't do it over dialup.)

Maybe someone braver will look at your file.
 
Back
Top