Donate SIGN UP

Excel, Today() and file changes

Avatar Image
Kakurol | 19:47 Thu 18th Aug 2011 | Technology
5 Answers
After years of using OpenOffice, I have bought Microsoft Office and changed my various spreadsheets to the Excel format.

But there is a slight annoyance that now occurs with 2 of those spreadsheets - if I open each just to have a look and immediately close the file then Excel prompts me if I want to save changes even though I haven't changed anything. All the others work as before.

A quick experiment shows that what is causing Excel to think that a change has been made is that cells in those 2 spreadsheets contain fomulae that make use of the Today() function.

Is there a setting to make Excel recognise only real changes to a spreadsheet rather a change to a cell value that happens solely because of a function call?
Gravatar

Answers

1 to 5 of 5rss feed

Best Answer

No best answer has yet been selected by Kakurol. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
Question Author
have now read about volatile functions and will have to figure out a way around the problem
Best of luck with it.
Open the sheet, press ALT and F11, in the left hand pane that opens up double click on the words "this workbook" and then copy and paste the following into the window that opens in the middle.

Private Sub Workbook_Open()
ThisWorkbook.Saved = True
End Sub

Close the VBA editor, close the spreadsheet and agree to save changes and next time you open the spreadsheet and close it you won't be prompted to save unless you have made some genuine changes.,
Do you have to use the 'today' function?
Question Author
Thank you ChuckFickens, that works. I had seen that bit of code when I was googling for a solution but couldn't work out where it needed to go, but because you said that there should be a left hand pane I realised that I needed to open the project explorer - it had been closed up to now.

And scotman - it's just a small personal spreadsheet and I like automating calculations if I can rather than needing to input the date manually.

1 to 5 of 5rss feed

Do you know the answer?

Excel, Today() and file changes

Answer Question >>

Related Questions

Sorry, we can't find any related questions. Try using the search bar at the top of the page to search for some keywords, or choose a topic and submit your own question.