wäre möglich, dass bei Eintrag in einer Zelle innerhalb dieser Zelle ein Kommentar generiert wird, der dann den Usernamen enthält?
Danke schon jetzt für die Rückmeldungen.
Gruß - Wolfgang
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim strText As String
Dim objRange As Range
Dim objCell As Range
On Error GoTo Fin
Set objRange = Intersect(Target, Range("C3:AG154"))
If Not objRange Is Nothing Then
For Each objCell In objRange
With objCell
If Not IsEmpty(.Value) Then
strText = Environ("USERNAME") & ": " & Date & " " & Time
If Trim$(strText) vbNullString Then
If .Comment Is Nothing Then
.AddComment (strText)
Else
.Comment.Text Text:=strText
End If
.Comment.Shape.TextFrame.AutoSize = True
End If
Else
If Not .Comment Is Nothing Then .Comment.Delete
End If
End With
Next objCell
End If
Fin:
Set objRange = Nothing
If Err.Number 0 Then MsgBox "Error: " & _
Err.Number & " " & Err.Description
End Sub
Anpassungen musst Du natürlich noch vornehmen! Im Moment funktioniert es nur im Bereich "C3:AG154". Code gehört in den Codebereich des Tabellenblattes in dem Du das machen möchtest.