Hi All,
So I have this code:
Currently I get the error at MkDir NewPth, NewPth doesn't seem to add the K3 Range... even though when I hover over the name it shows the value for the Range, but doesn't show it as part of NewPth.
Thanks in advance
So I have this code:
Code:
Sub SaveFilewithNewName() Dim NewFN As Variant
Dim NewPth As String
Dim WRK2 As Workbook
PostToRegister
'Copy File to New Path and Filename
ActiveSheet.Copy
'Change File Path to Server File Path when ready
NewPth = "E:\NewProject\File\" & Range("K3")
MkDir NewPth
NewFN = NewPth & "\" & Range("K3").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
NextFile
End Sub
Currently I get the error at MkDir NewPth, NewPth doesn't seem to add the K3 Range... even though when I hover over the name it shows the value for the Range, but doesn't show it as part of NewPth.
Thanks in advance
Last edited: