View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jeremy Strom Jeremy Strom is offline
external usenet poster
 
Posts: 1
Default Workbook Deactivate event problem

Hi,

The issue I am having is easily reproducible I think (I'm using Office
2003):

1. Create two files: Book1.xls, and Book2.xls.
2. In Book1.xls, add any code to the Workbook_Deactivate event. I've
used this:
Private Sub Workbook_Deactivate()
n = 1 + 1
End Sub
3. Change any cell in both workbooks (anything that will trigger a
save prompt on exit).
4. Activate the workbook that does not contain the deactivate event
(Book2.xls).
5. Close the application using File -- Exit.

It will prompt you to save both documents. If you hit Yes to both
prompts, it will then do NOTHING. Then if you select File -- Exit
again, both files will save and close with no prompts.

I've looked around for a solution but so far haven't found anything.
Has anybody seen this before or know why it does this?

Thanks!