Sub AddDateAndName()
Dim sShort As String
sShort = Application.UserName
If Not Intersect(ActiveCell, Range("B10:B50")) Is Nothing Then
If ActiveCell.Value = "" Then
ActiveCell.Value = Date & " " & sShort & ": "
Else
ActiveCell.Value = ActiveCell.Value & Chr(10) & Date & " " & sShort & ": "
End If
Else
MsgBox "Not permitted in this cell", vbExclamation + vbOKOnly
End If
End Sub
Bookmarks