![]() |
Delete workbook..?
Hi Vadhimoo
Yes this is possible Try this event in the thisworkbook module of Exp.xls When you open the workbook it test the date Private Sub Workbook_Open() If Date = DateSerial(2006, 12, 28) Then With ThisWorkbook .ChangeFileAccess xlReadOnly Kill .FullName .Close False End With End If End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Vadhimoo" wrote in message ... Hi , I want to write a macro for delete the workbook itself. I have a workbook named as "Exp.xls". In that workbook, i want to write a code, If the TODAY() is equal to "12/28/2006" means that "Exp.xls" workbook should be deleted from my folder. Is it possible..? Thanks for your reply. |
Delete workbook..?
Hi Ron de Bruin,
Thanks a lot. It working well. Have a nice day..! "Ron de Bruin" wrote: Hi Vadhimoo Yes this is possible Try this event in the thisworkbook module of Exp.xls When you open the workbook it test the date Private Sub Workbook_Open() If Date = DateSerial(2006, 12, 28) Then With ThisWorkbook .ChangeFileAccess xlReadOnly Kill .FullName .Close False End With End If End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Vadhimoo" wrote in message ... Hi , I want to write a macro for delete the workbook itself. I have a workbook named as "Exp.xls". In that workbook, i want to write a code, If the TODAY() is equal to "12/28/2006" means that "Exp.xls" workbook should be deleted from my folder. Is it possible..? Thanks for your reply. |
All times are GMT +1. The time now is 05:22 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com