the macro below when run, prompts the save as box then deletes the original file. How can I get this to resave into a specified directory without the save as prompt box?
Code:
Sub DeleteFile()
Dim MyFullName
Dim fileSaveName
MyFullName = ActiveWorkbook.FullName
fileSaveName = Application.GetSaveAsFilename( _
fileFilter:="Excel Files (*.xls), *.xls")
If fileSaveName <> False Then
ActiveWorkbook.SaveAs fileSaveName
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile (MyFullName)
End If
End Sub