Otherwise you would need to use event code to enter today's date when you
clicked on the cell.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const myRange As String = "A1"
On Error GoTo endit
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(myRange)) Is Nothing Then
Target.Value = Format(Date, "mm-dd-yyyy")
End If
endit:
Application.EnableEvents = True
End Sub
This is sheet event code. Right-click on the sheet tab and "View Code"
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.