Hey Guys,
I am using VBA to copy a file from one folder already on the desktop (From Path), to another folder (ToPath) I create through VBA on the desktop.
ToPath = tempPath & "Documents and Settings" & "\" & tempUser & "\" & "Desktop" & "\" & FolderName
Everything goes fine up until the copy command where I have a runtime error 70, permission denied.
Set FSO = CreateObject("scripting.filesystemobject")
FSO.CopyFile Source:=FromPath & FileName, Destination:=ToPath
I did some troubleshooting, and noticed that if I manually create the "ToPath" folder, the file gets copied without any error.

Am I forgetting something to declare?
Have anyone faced such error?