View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
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