date comparison help

Giganews Newsgroups
Subject: date comparison help
Posted by:  CathyZ
Date: Wed, 3 May 2006

Hi,

I'm trying to use the less than operator to compare dates in a worksheet
against the date in a variable.  The = sign works ok, but neither the >= or
<= does not.  Here is the code, any help in using mainly the >= operator
would help greatly.

Do While Not IsEmpty(ActiveCell)
            If ActiveCell.Value >= startDates Then
                startRange = ActiveCell.Address
                Exit Sub
            Else
                ActiveCell.Offset(1, 0).Select
            End If
        Loop

Thanks
CathyZ

Replies