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.
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