Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Capture close excel event in .xla

Hi - I hope someone can help.

I'm trying to capture the event where someone closes Excel (using the
red "X"). My code is in an .xla and no other workbooks are open except
the hidden .xla.

My code is in "This Workbook" of the hidden .xla

I've tried:
Workbook_BeforeClose(Cancel As Boolean)
Workbook_WindowDeactivate(ByVal Wn As Window)
Workbook_Deactivate()
Workbook_SheetDeactivate(ByVal Sh As Object)

None are captured - Excel just shuts down without triggering.

The funny thing is, Workbook_Open() does trigger when the xla is
opened.

I'm using Excel 2000 if it makes any difference. Does anyone have any
ideas?

Thanks & regards,
Jon.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Capture close excel event in .xla

I would have thought that workbook close would have been triggered, so I
just tried it. And it did, the close event was triggered as expected.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Tournifreak" wrote in message
...
Hi - I hope someone can help.

I'm trying to capture the event where someone closes Excel (using the
red "X"). My code is in an .xla and no other workbooks are open except
the hidden .xla.

My code is in "This Workbook" of the hidden .xla

I've tried:
Workbook_BeforeClose(Cancel As Boolean)
Workbook_WindowDeactivate(ByVal Wn As Window)
Workbook_Deactivate()
Workbook_SheetDeactivate(ByVal Sh As Object)

None are captured - Excel just shuts down without triggering.

The funny thing is, Workbook_Open() does trigger when the xla is
opened.

I'm using Excel 2000 if it makes any difference. Does anyone have any
ideas?

Thanks & regards,
Jon.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Capture close excel event in .xla

Just noticed your comment re Excel 2000, so I tried it there, and it still
worked.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Tournifreak" wrote in message
...
Hi - I hope someone can help.

I'm trying to capture the event where someone closes Excel (using the
red "X"). My code is in an .xla and no other workbooks are open except
the hidden .xla.

My code is in "This Workbook" of the hidden .xla

I've tried:
Workbook_BeforeClose(Cancel As Boolean)
Workbook_WindowDeactivate(ByVal Wn As Window)
Workbook_Deactivate()
Workbook_SheetDeactivate(ByVal Sh As Object)

None are captured - Excel just shuts down without triggering.

The funny thing is, Workbook_Open() does trigger when the xla is
opened.

I'm using Excel 2000 if it makes any difference. Does anyone have any
ideas?

Thanks & regards,
Jon.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Capture close excel event in .xla

On 15 Jul, 10:25, "Bob Phillips" wrote:
Just noticed your comment re Excel 2000, so I tried it there, and it still
worked.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Tournifreak" wrote in message

...

Hi - I hope someone can help.


I'm trying to capture the event where someone closes Excel (using the
red "X"). My code is in an .xla and no other workbooks are open except
the hidden .xla.


My code is in "This Workbook" of the hidden .xla


I've tried:
Workbook_BeforeClose(Cancel As Boolean)
Workbook_WindowDeactivate(ByVal Wn As Window)
Workbook_Deactivate()
Workbook_SheetDeactivate(ByVal Sh As Object)


None are captured - Excel just shuts down without triggering.


The funny thing is, Workbook_Open() does trigger when the xla is
opened.


I'm using Excel 2000 if it makes any difference. Does anyone have any
ideas?


Thanks & regards,
Jon.


Hi Bob,
I just found this:
http://support.microsoft.com/kb/q248172/

Seems like this is a bug with the original release of Excel 2000. I'm
not sure if I have the service pack installed, so I'll install it
anyway and report back. Thanks for your help,
Jon.
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Capture close excel event in .xla

I didn't know about that bug, but I can confirm that I do have SR-1

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Tournifreak" wrote in message
...
On 15 Jul, 10:25, "Bob Phillips" wrote:
Just noticed your comment re Excel 2000, so I tried it there, and it
still
worked.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"Tournifreak" wrote in message

...

Hi - I hope someone can help.


I'm trying to capture the event where someone closes Excel (using the
red "X"). My code is in an .xla and no other workbooks are open except
the hidden .xla.


My code is in "This Workbook" of the hidden .xla


I've tried:
Workbook_BeforeClose(Cancel As Boolean)
Workbook_WindowDeactivate(ByVal Wn As Window)
Workbook_Deactivate()
Workbook_SheetDeactivate(ByVal Sh As Object)


None are captured - Excel just shuts down without triggering.


The funny thing is, Workbook_Open() does trigger when the xla is
opened.


I'm using Excel 2000 if it makes any difference. Does anyone have any
ideas?


Thanks & regards,
Jon.


Hi Bob,
I just found this:
http://support.microsoft.com/kb/q248172/

Seems like this is a bug with the original release of Excel 2000. I'm
not sure if I have the service pack installed, so I'll install it
anyway and report back. Thanks for your help,
Jon.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Capture close excel event in .xla

On 15 Jul, 11:37, "Bob Phillips" wrote:
I didn't know about that bug, but I can confirm that I do have SR-1

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Tournifreak" wrote in message

...

On 15 Jul, 10:25, "Bob Phillips" wrote:
Just noticed your comment re Excel 2000, so I tried it there, and it
still
worked.


--
HTH


Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)


"Tournifreak" wrote in message


...


Hi - I hope someone can help.


I'm trying to capture the event where someone closes Excel (using the
red "X"). My code is in an .xla and no other workbooks are open except
the hidden .xla.


My code is in "This Workbook" of the hidden .xla


I've tried:
Workbook_BeforeClose(Cancel As Boolean)
Workbook_WindowDeactivate(ByVal Wn As Window)
Workbook_Deactivate()
Workbook_SheetDeactivate(ByVal Sh As Object)


None are captured - Excel just shuts down without triggering.


The funny thing is, Workbook_Open() does trigger when the xla is
opened.


I'm using Excel 2000 if it makes any difference. Does anyone have any
ideas?


Thanks & regards,
Jon.


Hi Bob,
I just found this:
http://support.microsoft.com/kb/q248172/


Seems like this is a bug with the original release of Excel 2000. I'm
not sure if I have the service pack installed, so I'll install it
anyway and report back. Thanks for your help,
Jon.


With SR-1 installed, Workbook_BeforeClose now triggers from within
the .xla

Thanks!

Jon.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Capture Excel close Keith74 Excel Programming 3 January 25th 08 02:52 PM
Before Close Event Hide all Worksheets then Close Application RyanH Excel Programming 0 January 24th 08 03:15 PM
How to Capture insert row event in Excel using VBA Sri Ram[_2_] Excel Programming 2 August 8th 06 11:20 AM
How to capture the event before any sheet calculating in Excel JohnDing[_2_] Excel Programming 1 December 23rd 04 03:04 AM
How to capture the event before any sheet calculating in Excel JohnDing[_2_] Excel Programming 0 December 23rd 04 01:00 AM


All times are GMT +1. The time now is 06:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"