I have an Excel file with a number of macros, including some code in the Workbook_BeforeClose subroutine of ThisWorkbook. When the file is first opened, Workbook_Open runs some code and sets ThisWorkbook.Saved = True.
If I immediately close down the file without doing anything, ThisWorkbook.Saved has changed to False. If I put a message box at the end of Workbook_Open, it says that ThisWorkbook.Saved = True. The identical messagebox at the beginning of Workbook_BeforeClose comes back with ThisWorkbook.Saved = False every single time.
Is there something that I am missing? What can change the value of ThisWorkbook.Saved if no macros have executed and no cell values have changed?
If I immediately close down the file without doing anything, ThisWorkbook.Saved has changed to False. If I put a message box at the end of Workbook_Open, it says that ThisWorkbook.Saved = True. The identical messagebox at the beginning of Workbook_BeforeClose comes back with ThisWorkbook.Saved = False every single time.
Is there something that I am missing? What can change the value of ThisWorkbook.Saved if no macros have executed and no cell values have changed?