View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Steve Hunter Steve Hunter is offline
external usenet poster
 
Posts: 5
Default BeforeSave, Cancel and ReadOnly

Thanks, that works fine. I noticed that without trapping the BeforeClose event
the save before close dialog would just keep popping back up again and again
when clicking Yes.


"Jim Rech" wrote:
Users will be prompted to save changes if they try to close the workbook or
close Excel and Excel thinks changes have been made, so you might need to
add this to the ThisWorkbook module:

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