View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
LoDawg LoDawg is offline
external usenet poster
 
Posts: 16
Default Which x was clicked?

Sorry for the confusion, I am writing a dll that controls excel. I
destroy all excel toolbars and menus and create my own. I encountered a
problem when clicking on the little black x that is associated with an
individual workbook. It would ask if you wanted to save the workbook
and if you selected yes it would save then ask again and repeat this
until you selected no or cancel. To handle this I hijacked the
before_close event and determine the course of action to take. This
works great except that when you select the big x on the red button of
the excel window that closes all workbooks and the excel application it
only closes the active workbook. Thus, my previous question of how to
tell which x was selected so I can handle the need to close the
application completely.