Kode ini memungkinkan buku kerja hanya disimpan sebagai dirinya sendiri.
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
Kode ini akan memungkinkan untuk tidak disimpan oleh siapa pun kecuali mereka yang tahu caranya (application.enableevents).
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