i am trying to copy files from localfolder to sharedpoint where i am getting error 70 "Permission denied" . but when i copy paste manually its working fine. i dont have any problem in folder permission , only issues is using FSO. can anyone guide me on it.
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"
If FSO.CopyFolder Source:=FromPath, Destination:=ToPath
MsgBox " copied " & ToPath