View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vadhimoo Vadhimoo is offline
external usenet poster
 
Posts: 10
Default 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.