Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
delete workbook from one location and save workbook to new locatio Damien Excel Programming 5 August 3rd 06 03:05 PM
How to Delete a Range in Closed Workbook (to Replace Delete Query) [email protected] Excel Discussion (Misc queries) 1 March 8th 06 10:10 AM
Delete row if value in another workbook d4m Excel Programming 2 December 20th 05 04:36 PM
Automatically Delete WorkBook 2 modules by using Workbook 1 module ddiicc Excel Programming 5 July 27th 05 12:53 PM
How do I delete a workbook after the vba has run? Patrick Excel Programming 1 January 28th 05 04:17 PM


All times are GMT +1. The time now is 10:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"