title: Backing up shared database to drive where other users cannot delete
body: <p>I have been trying to automatically back up a database, that is on a shared drive, to a different drive every time it is accessed. I put together this code.</p>
  
  <pre><code>Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
   'Saves the current file to a backup folder and the default folder
   'Note that any backup is overwritten
       Application.DisplayAlerts = False
       ActiveWorkbook.SaveCopyAs Filename:="\\pdc2cif004.onelondon.tfl.local\vdm3_data1$\IanMartin\Desktop\Backup Files\" &amp; _
               ActiveWorkbook.Name
       ActiveWorkbook.Save
       Application.DisplayAlerts = True
   End Sub
  </code></pre>
  
  <p>This was placed in the worksheet as Before Save. The code works if I access the database, but it does not work if anyone else access the database.</p>
  
  <p>I know other staff have accessed the databases, but no backup file was created in my folder. I am trying to create a backup that will be placed in a drive where the other staff cannot accidentally find it and delete it by mistake.</p>