Preventing deletion of workbook

  • Thread starter Thread starter Rimma
  • Start date Start date
R

Rimma

Can anyone help? I have a shared workbook that is shared
by 30 employees. SOmeone deleted it yesterday. I want to
prevent this from happening again. Any suggestions?
 
Try adding this macro - it'll create a Filename.BAK each
time you
save the original - you can then just rename it to
an .XLS and keep going
(also, you could hide the backup by altering the path
(Activeworkbook.Path)
text to your secret directory path).

Sub auto_close()
Dim F As String
F = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name
F = Left(F, Len(F) - 3) & "BAK"
ActiveWorkbook.SaveCopyAs (F)
End Sub

good luck
 
Back
Top