Does this not require the user to point to the file location though?
The macro below I use creates a folder and I want the FSO procedure to get the path that has just been created and enter it into the cell without the user having to do this.
Here is my current macro
Sub Create_Folder_Move_Files()
Dim strDefpath, mainfolder, subfolder, subsubfolder, strPathname As String
Application.ScreenUpdating = False
Application.DisplayAlerts = False
On Error Resume Next ' If directory exist goto next line
strDefpath = "\\ccfilesvr\shared\membership services\operations\supervisors\RESOURCE AREA stats & info\Statistics\Daily Stats Import\" 'Default path name
mainfolder = Sheets("Move & Rename").Range("C2").Value ' stores value of C2 cell
subfolder = Sheets("Move & Rename").Range("D2").Value ' stores value of D2 cell
subsubfolder = Sheets("Move & Rename").Range("E2").Value ' stores value of E2 cell
If IsEmpty(mainfolder) Then Exit Sub
MkDir strDefpath & mainfolder ' Check or create mainfolder
strPathname = strDefpath & "\" & mainfolder
If IsEmpty(subfolder) Then Exit Sub
MkDir strPathname & "\" & subfolder ' Check or create subfolder
strPathname = strDefpath & "\" & mainfolder & "\" & subfolder
If IsEmpty(subsubfolder) Then Exit Sub
MkDir strPathname & "\" & subsubfolder ' Check or create subsubfolder
strPathname = strDefpath & "\" & mainfolder & "\" & subfolder & "\" & subsubfolder
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub
Bookmarks