Hi I am trying to get the time to display on a checklist I am creating in a separate cell to the date off the back of a double click fucntion.
I am able to get it to appear but the time is showing as 00:00:00 rather than the showing the time - I am happy for this to be reduced to just hours and minutes.
Below is what I have
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If ActiveCell.Column = 12 Then
ActiveCell.Offset(0, 1).Value = Application.UserName
ActiveCell.Offset(0, 2).Value = Format(Now, "dd/mm/yyyy")
ActiveCell.Offset(0, 3).Value = Format(Time, "hh/mm/ss")
End If
End Sub
I am able to get it to appear but the time is showing as 00:00:00 rather than the showing the time - I am happy for this to be reduced to just hours and minutes.
Below is what I have
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If ActiveCell.Column = 12 Then
ActiveCell.Offset(0, 1).Value = Application.UserName
ActiveCell.Offset(0, 2).Value = Format(Now, "dd/mm/yyyy")
ActiveCell.Offset(0, 3).Value = Format(Time, "hh/mm/ss")
End If
End Sub