I would suggest a set of simple macros, all hidden
One macro secretly password protects the whole thing
Code
-------------------
Private Sub ProtectBook(
ActiveWorkbook.Protect Password:="PASSWORD", Structure:=True, Windows:=Fals
ActiveSheet.Protect Password:="PASSWORD", Contents:=True, Scenarios:=Tru
End Su
-------------------
And another to Unprotect
Code
-------------------
Private Sub UnprotectBook(
ActiveWorkbook.UnProtect Password:="PASSWORD
ActiveSheet.UnProtect Password:="PASSWORD
End Su
-------------------
Then use the Workbook_BeforeSave to do the work for you
Code
-------------------
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean
ProtectBoo
ThisWorkbook.Sav
UnprotectBoo
End Su
-------------------
To just close, a Workbook_BeforeClose fixes the protection in place
Code
-------------------
Private Sub Workbook_BeforeClose(Cancel As Boolean
ProtectBoo
End Su
-------------------
Structured properly, your saved book is protected, but he user can kee
using it because the protecting and unprotecting keeps occuring in th
background
If they crash their program, they lose what they had anyway, the save
version WILL still be usable and macros still working