Ta koda omogoča, da se delovni zvezek shrani samo kot sam.
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
Ta koda bo omogočila, da je ne shrani kdorkoli, razen tistim, ki znajo (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