Hi Pawal,
Please check this code
Private Sub Workbook_Open()
Dim expired As Date
expired = "08/18/2013"
If Now() > expired Then
Call Macro1
'here Macro1 is your another Macro Code which you would like to run-'when
today's date is greater than 08/18/2013'
Else
MsgBox "Today date is not exceeded
nt:* Wednesday, August 14, 2013 11:07 AM
> *Subject:* Re: $$Excel-Macros$$ check date on open file
>
> Try This
>
> Private Sub Workbook_Open()
> If Now() > #8/18/2013# Then
> AnotherCode
> Else
> CurrentCode
> End If
> End Sub
>
&g
thanks Mate working great.
regards,
Pawel
From: De Premor
To: excel-macros@googlegroups.com
Sent: Wednesday, August 14, 2013 11:07 AM
Subject: Re: $$Excel-Macros$$ check date on open file
Try This
Private Sub Workbook_Open()
If Now() > #8/18/2
Try This
Private Sub Workbook_Open()
If Now() > #8/18/2013# Then
AnotherCode
Else
CurrentCode
End If
End Sub
Sub AnotherCode()
MsgBox "This Your Another Code"
End Sub
Sub CurrentCode()
MsgBox "This Your Current Code"
End Sub
On 14-08-2013 16:45, pawel lupi
Hi All,
is anyone can help me on this:
I'd like to run macro base on following criteria: when I open file, macro is
checking today's date and if today is greater than e.g. 18/08/2013 macro is
execution another code.
if anyone give me some few lines of the code I'll be appreciated.
Regards