I'm trying to delete three workbooks when closing a fourth workbook.
Basically, I generate these "exports" from one workbook through macros and have the user save the files somewhere else. I had to save the workbooks in the process so I could move data from one book to another without the variable bookX when adding new workbooks.
So now I need to delete them and I cant get the code to work on close.
I cant even get it to work when just running the macro, nevermind automatically on close.
This is the code I'm using at the moment:
Sub Auto_Close()
Kill ("X:\User Groups\Cost Centres.xls")
Kill ("X:\User Groups\Subjectives.xls")
Kill ("X:\User Groups\CC and Subj.xls")
End Sub
Thanks
DOMAL
Basically, I generate these "exports" from one workbook through macros and have the user save the files somewhere else. I had to save the workbooks in the process so I could move data from one book to another without the variable bookX when adding new workbooks.
So now I need to delete them and I cant get the code to work on close.
I cant even get it to work when just running the macro, nevermind automatically on close.
This is the code I'm using at the moment:
Sub Auto_Close()
Kill ("X:\User Groups\Cost Centres.xls")
Kill ("X:\User Groups\Subjectives.xls")
Kill ("X:\User Groups\CC and Subj.xls")
End Sub
Thanks
DOMAL