I need to speed up data entry in a spreadsheet by adding some VBA code so that when a cell in a range (for example A1:A999) is selected the cell show the current time. I know this can also be achieved fairly quickly with keyboard shortcuts (i.e. Ctrl+Shift+ but would like to make the spreadsheet do it instead).
Help!! I tried the following but it failed! Any suggestions??
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column = 1 Then
Cancel = True
With Target
.Value = Now
.NumberFormat = "[h]:mm:ss"
End With
End If
End Sub
Bookmarks