i want to create a sub that records in a list how many times you pressed the return key in the current session (it should write on a new line each time you reopen the file) heres are my attempts: somehow it's not working
Option Explicit
Private Sub Worksheet_activated(ByVal target As Range)
Target.Value = target.Value + 1
Application.OnKey "~", "CountDT"
End Sub
Private Sub worksheet_deactivated()
Application.OnKey "~"
End Sub
Option Explicit
Sub CountDT()
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = ActiveCell.Value & " " & Date & " " & Time
End Sub