How to Save this?

  • Thread starter Thread starter Ak Man
  • Start date Start date
A

Ak Man

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
MsgBox "Cannot Save this Workbook...Closing Excel!!!"
Application.DisplayAlerts = False
ActiveWorkbook.Close
Application.DisplayAlerts = True
Application.Quit
End Sub
 
You could go to the immediate window and type
APplication.EnableEvents = False

and save it.

Then turn the events back on if you need them.
 
Perfect!!!
Thanks....I was thinking about using enable events but just couldn't figure
out how.....
 
Back
Top