Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default Workbook Before_Close question

If user clicks the little 'x' in top right corner, then
I believe I can trap this with the Before_Close Event.
prior to the book closing.

Providing code has not saved the activeworbook
prior to this point, how do I Close without Saving
changes, please?

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Workbook Before_Close question

Try this Stuart

how do I Close without Saving changes, please?


Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Saved = True
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Stuart" wrote in message ...
If user clicks the little 'x' in top right corner, then
I believe I can trap this with the Before_Close Event.
prior to the book closing.

Providing code has not saved the activeworbook
prior to this point, how do I Close without Saving
changes, please?

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default Workbook Before_Close question

Got it.
Many thanks.

Regards

"Ron de Bruin" wrote in message
...
Try this Stuart

how do I Close without Saving changes, please?


Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Saved = True
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Stuart" wrote in message

...
If user clicks the little 'x' in top right corner, then
I believe I can trap this with the Before_Close Event.
prior to the book closing.

Providing code has not saved the activeworbook
prior to this point, how do I Close without Saving
changes, please?

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004


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
Wierd one concerning Before_Close and OnTime Antonio Excel Discussion (Misc queries) 14 June 9th 06 05:33 PM
Workbook Name question Stuart[_5_] Excel Programming 3 April 10th 04 07:35 PM
Before_Close problem Roberto[_4_] Excel Programming 4 November 15th 03 10:49 AM
Question for Experts: Opening workbook with workbook references Chris Excel Programming 0 September 11th 03 07:05 PM
Auto_Open & Before_Close John Wilson Excel Programming 0 August 6th 03 09:04 PM


All times are GMT +1. The time now is 01:30 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"