Hi guys,
In the workbook I am designing I need to be able to save files with a specific name, made up of the data from a specific cell and so I created a button to do so which worked fine.
Now I also want to give the option to undo this action by creating an undo button that will delete the saved file and open the original document.
My code is as follows:
Sub Undosave()
Application.ScreenUpdating = False
Application.OnTime Now, "Undosave2"
ThisWorkbook.Close SaveChanges:=False
End Sub
Sub Undosave2()
Application.Workbooks.Open ("C:\Users\Seth\Documents\Costing Program\Process Costing\Process Costing Updating")
Windows("C:\Users\Seth\Documents\Costing Program\Process Costing\Process Costing Updating").Activate
Kill ("C:\Users\Seth\Documents\Costing Program\Process Costing\" & Range("K37").Value)
MsgBox "Deleted"
Application.ScreenUpdating = True
End Sub
Any help would be gratefully appreciated![]()
Bookmarks