Saving Workbooks w/ Charts

B

Bob Barnes

Apparently an Excel Workbook w/ at least one Chart
in it will normally ask if the user wants to Save it,
even if no changes of any kind have been done...
This is "Scenario A".

That can be prevented by adding the below in the
Excel Object "ThisWorkbook"....

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Saved = True
End Sub

However, this stops a request to save a change WHEN
something has been changed = This is "Scenario B".

How do I prevent "Scenario B", but retain "Scenario A"???

TIA - Bob
 
J

Jon Peltier

Having a chart is not enough to make the workbook ask to save changes on
closing. Make sure there is no volatile data, such as RAND() or NOW().

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top