how to set date between two days using vba ?

Dlovan-IT

Registered User.
Local time
Today, 02:03
Joined
Oct 9, 2013
Messages
84
hello all my friends

i have a question i want set two dates by vba but i don't no how to do it ... for more understand look the simple example

If Date = #12/20/2013# Then
MsgBox "Wrong", vbExclamation, "attention"
End If

but i want set date between two days for example like that

If Date = between #12/20/2013# and #12/20/2014# Then
MsgBox "Wrong", vbExclamation, "attention"
End If

any one can tell me how to do it ?
 
There is no such thing as between in VBA, instead you do something like:
If Date >= ## and Date <= ## then
 
oh my friend thanks so much for your answer my problem is solved , but can you help me how i learn VBA Exactly ! any pdf do you have or any thing ?
 
I learned most of it by using Google and F1
 

Users who are viewing this thread

Back
Top Bottom