Delete doc on specific date

ExcelTheCell

Board Regular
Joined
Nov 14, 2010
Messages
158
Hi,

well i know that one part is possible but the other part i'm not sure...

1part.
On auto open check if date is biger then 31.12.2011. If it is delete document without asking for aproval.

2.part
What if all macro's are disabled how can we enable them, beacuse if reader disables macro and activeX then document will not be deleted? Is there any solution for this?

tnx
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
I got the code... just need to adjust it for the Word2007... can anyone help me?

PHP:
Public bIsClosing As Boolean
Dim wsSheet As Worksheet
Sub HideAll()
Application.ScreenUpdating = False
For Each wsPage In ThisDocument.Pages
    If wsPage.CodeName = "Sheet1" Then
     wsSheet.Visible = xlSheetVisible
    Else
     wsSheet.Visible = xlSheetVeryHidden
    End If
Next wsSheet
Application.ScreenUpdating = True
End Sub
Sub ShowAll()
bIsClosing = False
For Each wsSheet In ThisWorkbook.Worksheets
    If wsSheet.CodeName <> "Sheet1" Then
     wsSheet.Visible = xlSheetVisible
    End If
Next wsSheet
Sheet1.Visible = xlSheetVeryHidden
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top