Hello, I have been unable to find a code that allows me to move the current workbook from one folder into another so I thought of the idea of a save as that saves in the desired folder but also kills the file in the current folder. I have gotten the save to work but not the kill. The file is present in both folders, can someone help me?
path = "I:\AAA-PURCHASE ORDERS\test1"
path2 = "I:\AAA-PURCHASE ORDERS\test2"
filename1 = "PO#_" & Range("H4").Text & "_" & Range("C10").Text & "_" & Range("H7").Text & "_" & Range("F49").Text
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs FileName:=path2 & filename1 & ".xlsm", FileFormat:=xlOpenXMLWorkbookMacroEnabled
MsgBox "File Saved"
Application.DisplayAlerts = True
Kill path & filename1
Application.ActiveWorkbook.Close False
path = "I:\AAA-PURCHASE ORDERS\test1"
path2 = "I:\AAA-PURCHASE ORDERS\test2"
filename1 = "PO#_" & Range("H4").Text & "_" & Range("C10").Text & "_" & Range("H7").Text & "_" & Range("F49").Text
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs FileName:=path2 & filename1 & ".xlsm", FileFormat:=xlOpenXMLWorkbookMacroEnabled
MsgBox "File Saved"
Application.DisplayAlerts = True
Kill path & filename1
Application.ActiveWorkbook.Close False