NiceToMichu
New Member
- Joined
- Nov 17, 2015
- Messages
- 2
Hi guys,
These are my Subs:
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
I am basically trying to delete a file that has just been 'saved as' and then reopen the original from where the 'save as' was orignally created. Now the name of the 'saved as' file is made up from the file directory & one of the cell values "K37", I have tried multiple times but the error message pops-up and says it either can't find the file or file is out of range. Please help!
These are my Subs:
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
I am basically trying to delete a file that has just been 'saved as' and then reopen the original from where the 'save as' was orignally created. Now the name of the 'saved as' file is made up from the file directory & one of the cell values "K37", I have tried multiple times but the error message pops-up and says it either can't find the file or file is out of range. Please help!