Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am using fso to copy file from local folder to Shareddrive, but I am getting "permission denied" while copying to shareddrive. But it's working fine while I'm doing manually.so I hope no problem with sharedrive access permission.please help me to sort out this issue
Sub Copy_d()
Dim FSO As Object Dim FromPath As String Dim ToPath As String
FromPath = "give excel path" ToPath = "give share point path"
Set FSO = CreateObject("scripting.filesystemobject")
If FSO.FolderExists(FromPath) = False
Then MsgBox FromPath & " Path doesn't exist" Exit Sub
End If
FSO.CopyFolder Source:=FromPath, Destination:=ToPath
MsgBox " copied " & ToPath
End Sub
You forgot to explain from where you are trying to run things when it is failing, very pertinent piece of information we need to know in order to answer your question. I would suspect the issue lies in whatever process you are using to run things when not running directly from the Desktop Client as a logged on user, the account running things otherwise will need to have the proper File Share permissions/NTFS rights in order to do so.
Regards,
Brett