0

So I have this spreadsheet that I share with my Team, and I'm looking for a way to have a Today's date put in a cell, everytime there's a change in the worksheet. I found this coding, which is working, however, I don't want a message to pop up, I want TODAY() to be insert in cell D2 (I don't need time, just date). Any help would be much appriciated.

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim KeyCells As Range

' The variable KeyCells contains the cells that will
    ' cause an alert when they are changed.
    Set KeyCells = Range("A1:W160")

If Not Application.Intersect(KeyCells, Range(Target.Address)) _
           Is Nothing Then

' Display a message when one of the designated cells has been 
        ' changed.
        ' Place your code here.
        MsgBox "Cell " & Target.Address & " has changed."

End If
End Sub

0

You must log in to answer this question.

Browse other questions tagged .