View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
macrowriter macrowriter is offline
external usenet poster
 
Posts: 7
Default I get run time error '5' when I run this code. any sugestions?

Sub FileCopyExample()
Dim oFSO As Object
Dim sSourcePath As String
Dim sTargetPath As String

Set oFSO = CreateObject("Scripting.FileSystemObject")

oFSO.CopyFolder "C:\PNTTEMPL\CustomDoc\*", "C:\PNTTEMPL\CustomDoc\TEST\"
Set oFSO = Nothing

End Sub