I've developed a small VBA procedure which amongst other things copies a file to a folder. It works fine for me.
However, my business colleague, for whom I wrote it, is getting a 'Error 70 Permissions denied' failure when he runs the procedure, even though it's his file it's failing on.
I've included the code below just to give you the context but I'm sure this is something other than a coding error.
Set fs = CreateObject("Scripting.FileSystemObject")
strInputFolder = "Z:\Docs\Status Report\Data\Input"
strArchiveFolder = "Z:\Docs\Status Report\Data\Archive"
strTemplateFolder = "Z:\Docs\Status Report\Data"
Set r = fs.GetFolder(strInputFolder)
For Each f In r.Files
'Check if a IE browser hidden file and ignore it
If UCase(f.Name) <> "THUMBS.DB" Then
' Copy the input .xlsb file to the Archive folder
fs.CopyFile strInputFolder & "\" & f.Name, strArchiveFolder & "\Input\" & f.Name
What are the circumstances when this error is generated ? What do I need to check ?