ChatterBank27 mins ago
Excel, Today() and file changes
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?
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?
Answers
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.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.,
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.,
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.
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.
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.