Hi guys,
I hope you can help me with an issue I have.
I want to a create a code for a workbook that allows me to insert date and name when i doubleclick a given cell.
The output in the given cell should look like this: "John Doe, 31/08-2017".
The cell range should be H:Q.
The date should just be the given date, and the name I figure could be the name that is "registered" in Excel.
I have gotten the date-thing to work using the code below, but I need help with the name and getting the two thing into the same.
I really hope you guys can help me.
Thanks a lot!
I hope you can help me with an issue I have.
I want to a create a code for a workbook that allows me to insert date and name when i doubleclick a given cell.
The output in the given cell should look like this: "John Doe, 31/08-2017".
The cell range should be H:Q.
The date should just be the given date, and the name I figure could be the name that is "registered" in Excel.
I have gotten the date-thing to work using the code below, but I need help with the name and getting the two thing into the same.
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("H:Q")) Is Nothing Then
Cancel = True
Target.Value = Date
End If
End Sub
Thanks a lot!