Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Is workbook beforeclose event the best place to do this?

I want to check that a cell value = a predefined value and if it's not, don't
let the user close the workbook. The value needs to be 100%. Do you have
any suggestions on how to do this? This is what I have now:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Range("Reuse_Estimate_Total") < 1 Then
MsgBox ("The Reuse Estimate total is not equal to 100%" _
& "This will need to be updated before finishing")
End If
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default Is workbook beforeclose event the best place to do this?

Hello,

I would suggest to take the BeforeSave event.

If any innocent person just tries to read the file he should be able to
get out with wrong values as far as he does not save anything...

Regards,
Bernd

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
problem with beforeclose event Gordon Excel Programming 1 September 30th 04 11:21 PM
ThisWorkBook BeforeClose Event Doug Glancy Excel Programming 0 July 29th 04 12:36 AM
ThisWorkBook BeforeClose Event David Adamson[_4_] Excel Programming 0 July 29th 04 12:32 AM
Workbook_Beforeclose vs BeforeClose Event Juan Pablo González Excel Programming 3 February 2nd 04 12:17 AM
Cancelling the BeforeClose Event Troy[_5_] Excel Programming 6 December 2nd 03 06:40 AM


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