Set filesys = CreateObject("Scripting.FileSystemObject")
Set filetxt = filesys.CreateTextFile(filestring, True)
The second line causes the permission error. Why? I coulodn't figure what happened, it was fine, then it start giving me that errors after the latest update.