Avatar of RWayneH
Flag for United States of America

asked on 

Active Cell = Today ?

I am trying to check the value of a cell, to see if it is equal to today date or not?

Format of the ActiveCell is:

  : StartTimeStamp : #5/1/2017 7:57:12 AM# : Variant/Date

Here is what I have so far.  How do I get this to a True or Yes?  Keeps returning False/No.   Any ideas?

Sub Macro2()
    Range("B1000").Select  'No days task items should ever reach 1000 lines

    StartTimeStamp = ActiveCell.Value
    Do While Not StartTimeStamp = Now()
        StartTimeStamp = ActiveCell.Value
        MsgBox ("No")
        ActiveCell.Offset(-1, 0).Select

End Sub

Open in new window

VBAMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment

8/22/2022 - Mon