title: RmDir - Path/File Access Error VBA
body: <p>I'm attempting to delete a folder using the RmDr function in VBA. On executing the snippet below, I get the following error:</p>
  
  <blockquote>
    <p>"Path/File Access Error".</p>
  </blockquote>
  
  <pre><code>    'Delete HTML Folder
      If (DirExists(fileDir)) Then
          Kill fileDir &amp; Chr(92) &amp; "*.*"
          RmDir fileDir
      End If
  </code></pre>
  
  <p>The documentation reads:</p>
  
  <blockquote>
    <p>Remarks An error occurs if you try to use RmDir on a directory or folder containing files. Use the Kill statement to delete all files before attempting to remove a directory or folder.- <a href="https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/rmdir-statement" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/rmdir-statement</a></p>
  </blockquote>
  
  <p>My code already <strong>deletes</strong> all contents of the folder successfully, however I am still receiving this error.</p>
  
  <p>Does any one have any experience with this error?</p>