Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
delete workbook from one location and save workbook to new locatio | Excel Programming | |||
How to Delete a Range in Closed Workbook (to Replace Delete Query) | Excel Discussion (Misc queries) | |||
Delete row if value in another workbook | Excel Programming | |||
Automatically Delete WorkBook 2 modules by using Workbook 1 module | Excel Programming | |||
How do I delete a workbook after the vba has run? | Excel Programming |