Ur welcome friend, yaa it happens most of the time and with most of the people also.
Warm Regards, Ravi Kumar. From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of pankajinfo Sent: Tuesday, September 03, 2013 9:21 AM To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Excel File Date Contents Deletion Macro Thank You Ravi So Much for providing this code. this code can be used by Excel users whose data is used for presentations but they do not get credit for data compiling. On Fri, Aug 30, 2013 at 11:32 AM, Ravi Kumar <excellearn2...@gmail.com <mailto:excellearn2...@gmail.com> > wrote: Dear Pankaj, There is some changes in the code and u can use the attached file as well Private Sub Workbook_Open() On Error Resume Next Application.DisplayAlerts = False If "2013-08-31" >= Format(Now(), "yyyy-mm-dd") Then MsgBox "File will expire on 2013-08-31" Else Worksheets("Sheet3").Activate For Each sh In ActiveWorkbook.Sheets Cells.Select Selection.ClearContents sh.Activate sh.ChartObjects.Delete Next ActiveWorkbook.Save End If Application.DisplayAlerts = True End Sub Warm Regards, Ravi Kumar. From: Ravi Kumar [mailto:excellearn2...@gmail.com <mailto:excellearn2...@gmail.com> ] Sent: Friday, August 30, 2013 11:22 AM To: 'excel-macros@googlegroups.com <mailto:excel-macros@googlegroups.com> ' Subject: RE: $$Excel-Macros$$ Excel File Date Contents Deletion Macro Hi Pankaj, PFA solution. Note: Press "alt+f11" then go to "Thisworkbook". Select "workbook" from the left drop down and select "open" from the right drop down then paste the below code in this. You can use the attached file as well Private Sub Workbook_Open() On Error Resume Next Application.DisplayAlerts = False If Format(Now(), "yyyy-mm-dd") >= "2013-08-31" Then MsgBox "File will expire on 2013-08-31" Else Worksheets("Sheet3").Activate For Each sh In ActiveWorkbook.Sheets Cells.Select Selection.ClearContents sh.Activate sh.ChartObjects.Delete Next ActiveWorkbook.Save End If Application.DisplayAlerts = True End Sub Warm Regards, Ravi Kumar. From: excel-macros@googlegroups.com <mailto:excel-macros@googlegroups.com> [mailto:excel-macros@googlegroups.com] On Behalf Of pankajinfo Sent: Friday, August 30, 2013 9:58 AM To: excel-macros@googlegroups.com <mailto:excel-macros@googlegroups.com> Subject: $$Excel-Macros$$ Excel File Date Contents Deletion Macro Dear All, I want to create a excel file with Date limit. Like in a file there are some contents(Graphs, Dashboards Etc) with 3 sheets. What i wants is after a time period like 31-Aug13 it gets expired and no one can open it or if someone opens after 31-Aug-13 it will delete all the file contents and automatically saves without confirmation. -- Thanks Pankaj Kumar 9910075248 -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It's =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com <mailto:excel-macros+unsubscr...@googlegroups.com> . To post to this group, send email to excel-macros@googlegroups.com <mailto:excel-macros@googlegroups.com> . Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It's =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com <mailto:excel-macros%2bunsubscr...@googlegroups.com> . To post to this group, send email to excel-macros@googlegroups.com <mailto:excel-macros@googlegroups.com> . Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out. -- Thanks Pankaj Kumar 9910075248 -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It's =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com <mailto:excel-macros+unsubscr...@googlegroups.com> . To post to this group, send email to excel-macros@googlegroups.com <mailto:excel-macros@googlegroups.com> . Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out.