Prozedur nur für bestimmte Zelle
29.01.2004 15:10:47
Stefan Glander
habe eine sehr gute Prozedur gefunden und würde diese nun aber nur für den Bereich "A2:A10" und "B:B" anwenden wollen.
Wie muss ich den Code umstricken?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim str As String
If Target.Count > 1 Then Exit Sub
With Target
If .Comment Is Nothing Then
AddComment "Erstellt am: " & Date & " - " & Time & _
Chr(10) & "Erster Eintrag: " & .Value & _
" / " & Application.UserName
Else
str = .Comment.Text & Chr(10)
.Comment.Text str & Chr(10) & "Geändert am: " & _
Date & " - " & Time & Chr(10) & _
"Änderung: " & .Value & " / " & _
Application.UserName
End If
.Comment.Shape.TextFrame.AutoSize = True
End With
End Sub
Code eingefügt mit Syntaxhighlighter 2.5
Gruss
Stefan Glander