I have the following code to create a folder at a location specified by the user,
I also have the following code which currently copies a named file into a specified folder within the DestinationPath string.
Would someone be so kind as to help me by explaining how I could copy the file into the folder created within the initial piece of code, all within the same subroutine, if possible.
Many thanks.
VBA Code:
openAt = "My computer:"
Set ShellApp = CreateObject("Shell.Application").BrowseForFolder(0, "Please choose where to create the folder", 0, openAt)
On Error Resume Next
BrowseForFolder = ShellApp.Self.Path
MkDir (BrowseForFolder & "\" & Workbooks("Create folders & files").Worksheets("Tracker").Range("A2").value & _
"." & Right(Workbooks("Create folders & files").Worksheets("Tracker").Range("I2"), 4) & _
" - " & Workbooks("Create folders & files").Worksheets("Tracker").Range("E2").value)
I also have the following code which currently copies a named file into a specified folder within the DestinationPath string.
VBA Code:
Dim SourcePath As String
Dim DestinationPath As String
SourcePath = "C:\TEMPLATE\1. Front sheet.xlsm"
DestinationPath = "C:\test\1. Front sheet.xlsm"
FileCopy SourcePath, DestinationPath
Would someone be so kind as to help me by explaining how I could copy the file into the folder created within the initial piece of code, all within the same subroutine, if possible.
Many thanks.