the new Zauberkind huh? of the week.
I have a fairly large (7Mb) workbook which I haven't posted here.
It has a peculiar characteristic: when it's open with another workbook that shouldn't be saved, I have to close the App twice!
~~~~~~~~~~~~~~~~~~~~~
Example:
- open wb0
- open wb1 (wb1 is now ActiveWorkbook)
(both workbooks need to be updated)
- close app
- dialog: do you want to save wb1? - No
- dialog: do you want to save wb0? - Yes
...nothing happens
- close app
- no dialog
- wb0 is saved
- wb1 is not saved
...app closes
~~~~~~~~~~~~~~~~~~~~~
After much paring down, I came to the conclusion that the problem is connected with the WindowDeactivate event.
It doesn't need to have code, it just needs to be defined. Whether a WindowDeactivate event handler is defined in wb1 seems to be irrevant.
Is this a known problem? I couldn't find anything useful on the Net.
To duplicate the problem, I've attaced a WB with stripped down code in the Workbook:
Code: Select all
Private Sub Workbook_WindowDeactivate(ByVal Wn As Window)
End Sub ' Workbook_WindowDeactivate
I'm using Excel2003, and I'd be interested to know if this problem is known, reproducible, or fixed in later versions.
TIA
Zk