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
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.