Anzeige
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

Erstellungsdatum in Kommentaren

Forumthread: Erstellungsdatum in Kommentaren

Erstellungsdatum in Kommentaren
04.08.2003 10:58:56
Stefan C.
Hallo zusammen,
gibt es eine Möglichkeit statt des Benutzernamens das Ersterstellungsdatum in jeden neuen Kommentar automatisch einzufügen (statt Benutzername)?
Anzeige

4
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: Erstellungsdatum in Kommentaren
04.08.2003 12:37:12
Galenzo
Ich habe da mal das gebastelt, probier's mal aus:

Sub NewComment()
Dim sComment As String
Dim sDatum As String
If Not (ActiveCell.Comment Is Nothing) Then
sComment = ActiveCell.Comment.Text
ActiveCell.ClearComments
End If
sDatum = Format(ThisWorkbook.BuiltinDocumentProperties(11), "dd.mm.yyyy")
sComment = InputBox("Kommentar eingeben:", , sComment)
If sComment = "" Then Exit Sub
With ActiveCell
.AddComment
.Comment.Visible = False
.Comment.Text Text:=sDatum & vbLf & sComment
End With
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
End Sub


Anzeige
AW: Erstellungsdatum in Kommentaren
04.08.2003 12:41:27
Stephan
Hi Stefan !
Versuch mal folgenden Code (in das Klassenmodul der Tabelle schreiben!)

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim co As String
co = Time
Target.AddComment co
End Sub


AW: Erstellungsdatum in Kommentaren
04.08.2003 12:44:59
Stephan
besser:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim co As String
co = Time
Target.ClearComments
Target.AddComment co
End Sub


Anzeige
AW: Erstellungsdatum in Kommentaren
04.08.2003 13:14:50
Stefan C.
Hallo Galenzo, Hallo Stephan,
vielen Dank für die schnelle Hilfe ich probiere es gleich aus.
Viele Grüße aus München
Stefan C.

;

Forumthreads zu verwandten Themen

Anzeige
Anzeige
Anzeige
Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige