View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
RADO[_3_] RADO[_3_] is offline
external usenet poster
 
Posts: 79
Default Trapping Excel Close event

If want to control how a particular file closes, file BeforeClose event
You can add it to Workbook object:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
....
End Sub

Just go to VB editor, select the project, and click on ThisWorkbook. You
should see this event in the list of events.

It works in Excel 2000 and later, not sure about earlier versions.

RADO



"Bob J" wrote in message
...
Can anyone help with trapping the application.quit event
that is triggered by clicking on the close (X) box in the
upper right title bar or when the user performs a
File_Exit command and there is no Save Box genereated?