LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Feature to automatically save back up files to a different locatio geezz Excel Discussion (Misc queries) 2 December 23rd 08 12:37 PM
Select sheet tabs in workbook & save to separate workbook files stratocaster Excel Worksheet Functions 2 March 1st 06 03:35 PM
Automatically Delete WorkBook 2 modules by using Workbook 1 module ddiicc Excel Programming 5 July 27th 05 12:53 PM
Macro in Excel 2002 to save a workbook to a FTP location Lloyd Excel Discussion (Misc queries) 0 December 21st 04 02:49 PM
What commands do you use to name a workbook, save a workbook,open a workbook Steven R. Berke Excel Programming 1 July 24th 03 11:37 PM


All times are GMT +1. The time now is 05:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"