View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Zoo Zoo is offline
external usenet poster
 
Posts: 40
Default Avoid unloading of .xla addins when closing books are cancelled.

I have developed .xla addins.
After installing the addin,
run Excel.exe and add a new workbook and add a change to the workbook,
and click 'x' icon on the top right of the Excel window.
Then I'm asked whether I save the change or cancel the closing operation.
I clicked 'Cancel', then , all the workbooks are not closed , however ,
..xla addins are gone.
How can I avoid this?

To test the phenomenan,
I inserted the code below into 'Module1's of those addins.

sub auto_open()
MsgBox ThisWorkBook.FullName & " is opened."
end sub

sub auto_close()
MsgBox ThisWorkBook.FullName & " is closed."
end sub