View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Damien Damien is offline
external usenet poster
 
Posts: 42
Default delete workbook from one location and save workbook to new locatio

I need to be able to save a workbook to a new location and delete the same
workbook from the old location, if not delete then move the file to another
folder.
I am able to save a file using a named range but with my code I can't seem
to be able to delete.
I am currently trying with the following code:

Sub DeletethenSaveFile()

Dim Range As String
Set Proj = Sheets("Form").Range("$F$10")
DeleteFile "Blah Blah Blah" & Range("Proj") & "2.xls"
MsgBox "The requested file has been deleted"
ThisWorkbook.SaveCopyAs "Blah Blah Blah" & Range("Proj") & "2.xls"
MsgBox "Your file has been saved to it's new location"

End Sub

Please help! D