kennt jemand einen Code der automatisch ein Kommentar erzeugt mit aktuellem Datum und das nachdem eine Zelle mit einer bestimmten Farbe eingefärbt wurde?
Sub Makro1()
With ActiveCell
.AddComment
.Comment.Visible = True
.Comment.Text Text:=CStr(Date)
End With
End Sub
Den Code automatisch zu starten, wenn eine Farbe/Formatierung ändert, geht nicht. Das Ereignis ist nicht auswertbar.Sub Makro1()
With ActiveCell
.AddComment
.Comment.Visible = True
.Comment.Text Text:=Environ("Username") & ": " & CStr(Date)
End With
End Sub
Sub Makro1()
With ActiveCell
.AddComment
.Comment.Visible = True
.Comment.Text Text:=Environ("Username") & ": " & CStr(Date)
.Interior.ColorIndex = 23
End With
End Sub
Sub Makro1()
Dim rCell As Range, bStopAfterFirst As Boolean
If TypeName(Selection) = "Range" Then
For Each rCell In Selection
If Not bStopAfterFirst Then
rCell.AddComment
rCell.Comment.Visible = True
rCell.Comment.Text Text:=Environ("Username") & ": " & CStr(Date)
bStopAfterFirst = True ' Löschen für jede Zelle mit Kommentar
End If
rCell.Interior.ColorIndex = 23
Next rCell
End If
End Sub
Sub Makro1()
Dim rng As Range
For Each rng In Selection
With rng
.AddComment
.Comment.Visible = True
.Comment.Text Text:=Environ("Username") & ": " & CStr(Date)
.Interior.ColorIndex = 23
End With
Next rng
End Sub
cuSub Makro1()
With ActiveCell
.AddComment
.Comment.Visible = True
.Comment.Text Text:=Environ("Username") & ": " & CStr(Date)
.Interior.ColorIndex = 23
End With
End Sub
Sub Makro2()
With Selection
.ClearComments
.Interior.Pattern = xlNone
End With
End Sub
cuDie erweiterte Suchfunktion hilft dir, gezielt die besten Antworten zu finden
Suche nach den besten AntwortenEntdecke unsere meistgeklickten Beiträge in der Google Suche
Top 100 Threads jetzt ansehen