Comparing dates
Hi, I'm trying to compare dates in a macro and I think I just need to
be the told the correct format. Currently I have
If (DateValue(testdate) = DateValue("5 / 1 / 2007")) Then
cellSTBpaste = "Y" & ActiveCell.Row
cellorderpaste = "X" & ActiveCell.Row
Else
cellSTBpaste = "AB" & ActiveCell.Row
cellorderpaste = "AA" & ActiveCell.Row
End If
where testdate is a formatted date taken from a cell in the
spreadsheet. Could someone tell me the correct way to do it?
Thanks!
|