In my app I am creating, there is a procedure that does a file copy from the local drive to a network share. The issue I am having, is even though I have the share mapped, and I can browse to the share with no problems, when ever the procedure is run, I get a Permission Denied error.
When I get this error, I click on Debug and find the line causing the error which is my file copy line. If I click continue, the code sequence finishes and the file is copied out to the network share. I have no clue what is causing this issue or how to fix it. Is there a possible way of suppressing the error and having it just continue on with the next line?
The code procedure is as follows"
This line:
FileCopy DirName1 & nextbookA, DestName1 & nextbookA
is the line it crashes on
When I get this error, I click on Debug and find the line causing the error which is my file copy line. If I click continue, the code sequence finishes and the file is copied out to the network share. I have no clue what is causing this issue or how to fix it. Is there a possible way of suppressing the error and having it just continue on with the next line?
The code procedure is as follows"
Code:
'Set data paths. Where file is located and location to copy data
DestName1 = "X:\PDF\"
DirName1 = "C:\portfolio\TEMPDATA\"
nextbookA = Dir(DirName1 & "*.pdf")
If nextbookA <> "" Then
FileCopy DirName1 & nextbookA, DestName1 & nextbookA
Kill DirName1 & nextbookA
End If
FileCopy DirName1 & nextbookA, DestName1 & nextbookA
is the line it crashes on
Comment