View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Robert Schwenn Robert Schwenn is offline
external usenet poster
 
Posts: 5
Default Application Close Event

Thanks, very helpful.
Robert



Dave Peterson schrieb:
Take a look at Chip Pearson's site:
http://cpearson.com/excel/ExcelShutdown.htm



Robert Schwenn wrote:
Hi,
I can't find such an event (Office 2003). Is it possible with VBA to detect that
Excel is going to be closed?

My goal:
I want to prevent a workbook from being closed by the user as long as Excel is
running. This is no problem with this eventhandler:

Sub Workbook_BeforeClose(Cancel As Boolean)
Cancel = True
End Sub

But in this way the workbook never is closed, even when Excel should close...

Thanks,
Robert.