PC Review


Reply
Thread Tools Rate Thread

Distinguishing what is causing close

 
 
Peter Ostermann
Guest
Posts: n/a
 
      12th Jun 2008
Hi everyone,

I like to use the "Workbook_BeforeClose" event to program different actions
whether the workbook or the Excel application is beeing closed. Any ideas
how the cause of close can be realized? Thanks in advance for hints.

Peter Ostermann


 
Reply With Quote
 
 
 
 
Franz Erhart
Guest
Posts: n/a
 
      12th Jun 2008
1. Open VBA, means of Alt-F11
2. Open "DieseArbeitsmappe" - for german users, for others the name is
different
3. Select from dropdown menu object "workbook"
4. Select from dropdown menu prozedure "BeforeClose"
5. Enter your code to "Workbook_BeforeClose" as you wish

"Peter Ostermann" wrote:

> Hi everyone,
>
> I like to use the "Workbook_BeforeClose" event to program different actions
> whether the workbook or the Excel application is beeing closed. Any ideas
> how the cause of close can be realized? Thanks in advance for hints.
>
> Peter Ostermann
>
>
>

 
Reply With Quote
 
Norman Jones
Guest
Posts: n/a
 
      12th Jun 2008
Hi Franz,

> 2. Open "DieseArbeitsmappe" - for german users, for others the name is
> different


I think that you are referring to the workbook's
ThisWorkbook module.

However, I think that Peter's question seeks
a method to differentiate the closure of a
workbook (e.g. ActiveWorkbook.Close)
from a closure caused by terminating the Excel
session.



---
Regards.
Norman


"Franz Erhart" <Franz (E-Mail Removed)> wrote in message
news8299E20-1D49-4761-B332-(E-Mail Removed)...
> 1. Open VBA, means of Alt-F11
> 2. Open "DieseArbeitsmappe" - for german users, for others the name is
> different
> 3. Select from dropdown menu object "workbook"
> 4. Select from dropdown menu prozedure "BeforeClose"
> 5. Enter your code to "Workbook_BeforeClose" as you wish
>
> "Peter Ostermann" wrote:
>
>> Hi everyone,
>>
>> I like to use the "Workbook_BeforeClose" event to program different
>> actions
>> whether the workbook or the Excel application is beeing closed. Any ideas
>> how the cause of close can be realized? Thanks in advance for hints.
>>
>> Peter Ostermann
>>
>>
>>


 
Reply With Quote
 
Peter Ostermann
Guest
Posts: n/a
 
      12th Jun 2008
Hi, Norman,

> However, I think that Peter's question seeks
> a method to differentiate the closure of a
> workbook (e.g. ActiveWorkbook.Close)
> from a closure caused by terminating the Excel
> session.
>

you describe exactly what I seek. I direct my question to the Microsoft
MVPs. May be one of you people have the info?
Thanks for any answer.

Regards
Peter


 
Reply With Quote
 
Peter Ostermann
Guest
Posts: n/a
 
      14th Jun 2008
Hi NG,

if there is no solution, please state that there is none. That could help
stopping from further seaching.

Thanks
Peter


"Peter Ostermann" <peter-(E-Mail Removed)> schrieb im Newsbeitrag
news:g2r1co$2e8$03$(E-Mail Removed)...
> Hi, Norman,
>
>> However, I think that Peter's question seeks
>> a method to differentiate the closure of a
>> workbook (e.g. ActiveWorkbook.Close)
>> from a closure caused by terminating the Excel
>> session.
>>

> you describe exactly what I seek. I direct my question to the Microsoft
> MVPs. May be one of you people have the info?
> Thanks for any answer.
>
> Regards
> Peter
>



 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      14th Jun 2008
Check out Chip Pearson's site:
http://www.cpearson.com/excel/ExcelShutdown.htm


Peter Ostermann wrote:
>
> Hi everyone,
>
> I like to use the "Workbook_BeforeClose" event to program different actions
> whether the workbook or the Excel application is beeing closed. Any ideas
> how the cause of close can be realized? Thanks in advance for hints.
>
> Peter Ostermann


--

Dave Peterson
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is BCM causing Outlook to close? QuercusR Microsoft Outlook BCM 2 5th Aug 2009 09:44 AM
DEP causing explorer to close Rocky Windows XP General 10 5th Oct 2005 11:03 PM
web pages will not close without causing error djob7 Windows XP Help 0 14th Sep 2005 05:10 AM
I think a record is causing my database to close =?Utf-8?B?RGF0YWJhc2UgVXNlcg==?= Microsoft Access 2 19th Jun 2005 01:52 PM
Downloads causing browser to close Adam Windows XP Help 1 27th Apr 2004 12:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:29 AM.