View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default 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.