I am getting the following error in the Expiry date formula in workbook
Private Sub Workbook_Open()
Dim Edate As Date
Edate = Format("31/12/2012", "DD/MM/YYYY") ' Replace this with the date you want
If Date > Edate + 2 Then
MsgBox "This workbook is Expired and will now close !!!"
ActiveWorkbook.Close
End If
End Sub
i am using the above mension formula for expiry date.
it says
Compile error
Ambigous name detected : workbook_open
please help me to solve this. thanks
Private Sub Workbook_Open()
Dim Edate As Date
Edate = Format("31/12/2012", "DD/MM/YYYY") ' Replace this with the date you want
If Date > Edate + 2 Then
MsgBox "This workbook is Expired and will now close !!!"
ActiveWorkbook.Close
End If
End Sub
i am using the above mension formula for expiry date.
it says
Compile error
Ambigous name detected : workbook_open
please help me to solve this. thanks