' Add Reference to Microsoft Scripting Runtime
Sub CopyAllFiles()
Dim MyFSO As FileSystemObject
Dim MyFile As File
Dim SourceFolder As String
Dim DestinationFolder As String
Dim MyFolder As Folder
Dim MySubFolder As Folder
SourceFolder = "C:\Users\vbausefulcodes\Desktop\Source"
DestinationFolder = "C:\Users\vbausefulcodes\Desktop\Destination"
Set MyFSO = New Scripting.FileSystemObject
Set MyFolder = MyFSO.GetFolder(SourceFolder)
For Each MyFile In MyFolder.Files
MyFSO.CopyFile Source:=MyFSO.GetFile(MyFile), _
Destination:=DestinationFolder & "\" & MyFile.Name, Overwritefiles:=False
Next MyFile
End Sub
VBA Outlook KPI Excel Alt+F11 Dashboards Macros Recording Graphs Automation Developer WaterFall Powerpoint Charts Pivot Tables Forecast Charts