Questo codice consente di salvare la cartella di lavoro solo come se stessa.
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
Questo codice consentirà di non essere salvato da chiunque tranne coloro che sanno come (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