Bu kod, çalışma kitabının yalnızca kendisi olarak kaydedilmesine izin verir.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI Then
Cancel = True
MsgBox "Sorry, you can only save this workbook with its original name."
End If
End Sub
Bu kod, nasıl yapılacağını bilenler (application.enableevents) dışında herhangi biri tarafından kaydedilmemesine izin verecektir.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Cancel = True
MsgBox ("All File Save and File Save As commands in this sheet ONLY have been turned OFF. Pretty cool, huh??")
End Sub