3 Replies Latest reply on Aug 6, 2018 6:31 AM by Robert Voogt

    Permission denied Error 70, when opening txt file with oFile.

    Robert Voogt

      Hi all,

      I have a simple question. I get an error 70 here:


      Set oFile = fso.OpenTextFile("D:\Spare Part Generator\Log\Missing Descriptions.txt", 8, True) '8 = ForAppending


      This is in a macro that is run multiple times in a row, it processes all slddrws in a designated folder. It doesn't give the error on the first couple of runs. For example, I once run the code 200 times and no error occured.

      Now I let the code run in another designated folder and I get this error after 45 runs. (it varies)


      The macro opens and closes the file after every run.


      The txt file location always remains the same, it is not opened elsewhere, only I have access and it is not set to read-only or hidden.