G
Guest
I'm trying to test for a specific date.
If todays date is greater than the date in cell A1
then complete the action, else, show the message "Unable to ..."
but unless I use <> the comparison does not work. The code
does not run. Why is this?
The following runs:
-------------
Dim dt as Date
dt = .Cells (1,1)
If date1 <> Now() Then
MsgBox "Unable to.."
------------
This does not run:
Dim dt as Date
dt = .Cells (1,1)
If dt > Now() Then
MsgBox "Unable to.."
If todays date is greater than the date in cell A1
then complete the action, else, show the message "Unable to ..."
but unless I use <> the comparison does not work. The code
does not run. Why is this?
The following runs:
-------------
Dim dt as Date
dt = .Cells (1,1)
If date1 <> Now() Then
MsgBox "Unable to.."
------------
This does not run:
Dim dt as Date
dt = .Cells (1,1)
If dt > Now() Then
MsgBox "Unable to.."