Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel ThisWorkbook.saved always true

Status
Not open for further replies.

Phantek

Programmer
Apr 25, 2011
29
0
0
US
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?
 
is there any code after thisworkbook.saved = true ?

Does the workbook open code interact with any shapes or embedded objects?

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top