View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Silena K-K Silena K-K is offline
external usenet poster
 
Posts: 37
Default Disable Save/Save As - not working?

Hi Gord

I followed your steps and have the following code in VB but now when I use
"ctrl s" or F12 to test that Save/Save As doesn't work it, crashes Excel.
Any
ideas why? Silena

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ThisWorkbook.Saved = True
ThisWorkbook.Close

End Sub

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

End Sub