Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Distinguishing what is causing close

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Distinguishing what is causing close

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 421
Default Distinguishing what is causing close

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 wrote in message
...
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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Distinguishing what is causing close

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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Distinguishing what is causing close

Hi NG,

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

Thanks
Peter


"Peter Ostermann" schrieb im Newsbeitrag
...
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





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Distinguishing what is causing close

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
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
In 2007 I am having difficulty distinguishing highlighted areas Bear Black Excel Discussion (Misc queries) 2 November 20th 08 09:31 AM
distinguishing filenames JASelep Excel Programming 1 October 22nd 07 05:38 PM
~~~ Distinguishing Normal; X1.5 and X2 Hours throughout the week by what day and time they are worked ~~~ Corey Excel Programming 0 August 2nd 06 12:37 AM
distinguishing formula cells [email protected] Excel Discussion (Misc queries) 6 June 12th 06 01:10 AM
Distinguishing cell formula from value. buczacz Excel Programming 2 September 23rd 03 07:43 AM


All times are GMT +1. The time now is 06:23 AM.

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"