Prevent dialogue: "save changes"?

  • Thread starter Thread starter test
  • Start date Start date
T

test

I've got this workbook with several worksheets.
If I open this workbook and close it, the question if I want to save
the changes is asked every time. Even if I didn't make any changes.

I think there could be 2 reasons for this dialogue window.

1- I don't close the file with the same worksheet in the front.
If the file is opened with sheet2 in front when I open it, and look at
sheet1, and the close it. Could this be a reason that the "save
changes" question is asked?

2- In one of the sheets, I use the now() formula.
The sheet is calculated automatically. Could it be that the now()
makes the program think the sheet is changed?
I don't open the sheet where the now() function is used very often, so
if this causes the "save changes", it would be great to make the now()
function only when the sheet is viewed.

Could these be the reason for the "save changes" question even if the
sheet was only opened to view a sheet?
What can I do to prevent the question every time, even when there
weren't any changes?

Thanks in advance
 
You probably have Volatile formulas within. E.g TODAY,NOW etc These formula
recalculate every time you open the file or do most things in Excel.
 
Thank you
Is there a way to ony make this calculate when the sheet (where I use
now() ) is opened?
 
Set Calculation Options to Manual and uncheck "recalculate before save"

Add this event code to the worksheet in question.

Private Sub Worksheet_Activate()
Application.Calculate
End Sub

Only when you select that sheet will you calculate.

Note: if you open this workbook after a workbook with calculation set at
auto, this workbook will also be changed to auto-calc.

i.e. First workbook opened determines the calculation mode for subsequent
workbooks.

You have to be careful with this...................


Gord Dibben MS Excel MVP
 
Thank you very much!!


Set Calculation Options to Manual and uncheck "recalculate before save"

Add this event code to the worksheet in question.

Private Sub Worksheet_Activate()
Application.Calculate
End Sub

Only when you select that sheet will you calculate.

Note: if you open this workbook after a workbook with calculation set at
auto, this workbook will also be changed to auto-calc.

i.e. First workbook opened determines the calculation mode for subsequent
workbooks.

You have to be careful with this...................


Gord Dibben MS Excel MVP
 
Back
Top