F
Frank Dulk
How do I do to copy several files of a folder for other, using VBA?
Douglas J. Steele said:You have to copy them one-by-one. If you're wanting to copy all files
matching a particular pattern, use the Dir function to determine the files.
Douglas J. Steele said:Dim strDestinationFolder As String
Dim strSourceFolder As String
Dim strFile As String
strDestinationFolder = "C:\Another Folder\"
strSourceFolder = "C:\My Data\"
strFile = Dir$(strSourceFolder & "*.XLS")
Do While Len(strFile) > 0
FileCopy strSourceFolder & strFile, strDestinationFolder & strFile
strFile = Dir$()
Loop