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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top