Comparing dates
What's weird is if I change the = to a <
If (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
then everything goes through the Else and nothing through the If. Any
ideas?
Can you put a break point on this If statement (click the gray border on the
left of it to produce a red dot and highlight the line in red), then run
your macro and when it stops, issue a ?testdate command in the Immediate
window and tell us what prints out?
Rick
|