willow1985
Well-known Member
- Joined
- Jul 24, 2019
- Messages
- 921
- Office Version
- 365
- Platform
- Windows
VBA Code:
Sub Macro1()
'
' Macro1 Macro
'
Dim SourcePath As String
Dim DestinationPath As String
Set fso = CreateObject("Scripting.FileSystemObject")
SourcePath = Range("A1").Value 'would like every value in column A
DestinationPath = Range("B1").Value 'would like every value in column B
'Copy Folder
fso.CopyFolder SourcePath, DestinationPath
'
End Sub
Book1 | ||||
---|---|---|---|---|
A | B | |||
1 | \\dav-1\data\ADMINISTRATION\Willow Documents\IN WORK\Source | \\dav-1\data\ADMINISTRATION\Willow Documents\Destination | ||
2 | \\dav-1\data\ADMINISTRATION\Willow Documents\IN WORK\Source2 | \\dav-1\data\ADMINISTRATION\Willow Documents\Destination2 | ||
3 | \\dav-1\data\ADMINISTRATION\Willow Documents\IN WORK\Source3 | \\dav-1\data\ADMINISTRATION\Willow Documents\Destination3 | ||
Sheet1 |