Just change the destination path to whatever you create in the first macro? For example:
Sub CreateFolderUsingRangeValue()
Dim ObjA, NewFolder As String
Const RootFolder As String = "\\ccfilesvr\shared\membership services\operations\supervisors\RESOURCE AREA stats & info\Statistics\Daily Stats Import 2014\Daily Stats July 2014"
NewFolder = RootFolder & "\" & Sheets("Move & Rename").Range("C2").Value & Format(Sheets("Move & Rename").Range("B2 ").Value, " dd mmm yy")
Set ObjA = CreateObject("scripting.filesystemobject")
If ObjA.folderexists(NewFolder) = True Then
If MsgBox("Folder Exists, do you want to erase it?", vbYesNo, "CriticalInfor...") = vbNo Then
Exit Sub
Else
ObjA.deletefolder (NewFolder)
ObjA.createfolder (NewFolder)
End If
Else
ObjA.createfolder (NewFolder)
End If
Call Move_AVHT_CC(NewFolder)
End Sub
Sub Move_AVHT_CC(strDestinationPath As String)
Dim strFile As String, strNewFile As String
Const strSourcePath As String = "A:\"
strNewFile = Sheets("Move & Rename").Range("A4").Value & " " & _
Format(Sheets("Move & Rename").Range("B2").Value, "dd mmm yy") & ".xls"
If Dir$(strDestinationPath & strNewFile) <> "" Then
MsgBox "There is already an existing file named " & vbLf & strDestinationPath & strNewFile, _
vbExclamation, "Dated File Name Exists"
Exit Sub
End If
strFile = Dir$(strSourcePath & "AVHT CC*")
If strFile <> "" Then
Name (strSourcePath & strFile) As (strDestinationPath & strNewFile)
Else
MsgBox "No file found. ", , "File Not Found"
End If
End Sub
Bookmarks