Avatar of RWayneH
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()
'
    Sheets("TaskTracker").Select
    Range("B1000").Select  'No days task items should ever reach 1000 lines
    Selection.End(xlUp).Select

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

End Sub

Open in new window

VBAMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
RWayneH

8/22/2022 - Mon