ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Workbook_BeforeClose in Personal.xls (https://www.excelbanter.com/excel-programming/381007-re-workbook_beforeclose-personal-xls.html)

Bob Phillips

Workbook_BeforeClose in Personal.xls
 
Why don't you just put in the BeforeClose of the particular workbook?

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"btee" wrote in message
...
I would like to run a macro whenever a workbook is closed (with or without
saving) in Excel. I tried to do this by placing the code in the
Workbook_BeforeClose in Personal.xls and making it Public. It didn't
work!

Is there anyway to do this? I'm aware of Auto_Close, but I want this to
happen on the Workbook, not App.

Thanks.





NickHK

Workbook_BeforeClose in Personal.xls
 
Sounds like you need this:
http://www.cpearson.com/excel/AppEvent.htm

NickHK

"btee" wrote in message
...
We have a product called Essbase that users connect to through Excel
spreadsheets. Many times, they fail to disconnect leaving multiple

sessions
hanging after the workbook is closed - and, tying up the server. If this
code is in their Personal.xls file, it will automatically disconnect their
sessions.

"Bob Phillips" wrote:

Why don't you just put in the BeforeClose of the particular workbook?

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"btee" wrote in message
...
I would like to run a macro whenever a workbook is closed (with or

without
saving) in Excel. I tried to do this by placing the code in the
Workbook_BeforeClose in Personal.xls and making it Public. It didn't
work!

Is there anyway to do this? I'm aware of Auto_Close, but I want this

to
happen on the Workbook, not App.

Thanks.









All times are GMT +1. The time now is 11:22 PM.

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