View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default 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.