ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   captcure close application event (https://www.excelbanter.com/excel-worksheet-functions/233907-captcure-close-application-event.html)

suru

captcure close application event
 
Hi,
I am new to VBA.

Can anyone tell me how to capture Close Application (i.e. close all
workbooks)
event in Microsoft Excel using VBA?


I know that, when i say close all, Microsoft Excel, fires close
workbook for each workbook.
But i need to know, if the user has clicked "close application",
since i need to do data clean up on that event.


thnx,
suraj

Bernie Deitrick

captcure close application event
 
suraj,

There is no application level exit event. To see what events are available, visit Chip's page on
events:

http://www.cpearson.com/excel/Events.aspx

"Another method to determine what events are available is to create an empty class module, and enter
the following code:

Dim WithEvents App As Application

<snip

Then, select App in the left side dropdown at the top of the code window. All the events for the
selected item in the left dropdown will be listed in the right dropdown."

HTH,
Bernie
MS Excel MVP


"suru" wrote in message
...
Hi,
I am new to VBA.

Can anyone tell me how to capture Close Application (i.e. close all
workbooks)
event in Microsoft Excel using VBA?


I know that, when i say close all, Microsoft Excel, fires close
workbook for each workbook.
But i need to know, if the user has clicked "close application",
since i need to do data clean up on that event.


thnx,
suraj




suru

captcure close application event
 
thnx for the inputs :)


All times are GMT +1. The time now is 09:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com