REALLY hoping this gets some helpful response, otherwise my sanity is gone burgers:
I have been having an issue trying to get a userform to save my workbook (using activeworkbook.save or thisworkbook.save). In case my other code was causing some issue I tried this test with a brand new file:
1. Open excel (2003 on Win XP Pro SP3)
2. Save book1.xls to default location
3. Open VB editor, insert "ActiveWorkbook.save" into a 'before close' sub under ThisWorkbook
4. Save file (by clicking on save button). Close VB editor.
5. Make change to sheet (simply type some text on the blank sheet1), then close workbook without closing excel. As expected, the workbook closes with no 'do you want to save changes' prompt because my 'before close' routine has already saved it.
6. Can open and close workbook several times and it works just fine. Any text added is automatically saved on closing the workbook. All good so far.
7. Now if I close excel, then reopen it, and then open Book1 and try it again. I get the 'do you want to save' prompt and the .save command is doing nothing.
So closing excel and reopening it has broken it. Any ideas what is happening here?
I inserted a msgbox attached to an IF ActiveWorkbook.Readonly statement in the same sub and have confirmed that the sub is getting called, and the file is not readonly. Just no error, and won't save.