mal einge Beispiele
205. Excel Zellen Kommentar Eigenschaften
ob und wie man die Eigenschaften dauerhaftt umstellen kann, weiß ich nicht. Ich helfe mir immer mit fogendem Makro, das alle Kommentare auf allen Arbeitsblättern der aktiven Arbeitsmappe auf einmal nach meinem Geschmack formatiert:
Sub Kommentar_Font()
Dim Cell As Range
For Each Cell In Cells.SpecialCells(xlCellTypeComments)
With Cell.Comment.Shape.TextFrame.Characters.Font
.Size = 100
.Bold = True
.ColorIndex = 3
.FontStyle = "Arial"
End With
Next
End Sub
Oder noch größe
Sub Kommentar_Font_14_AutoSize()
Dim Cell As Range
For Each Cell In Cells.SpecialCells(xlCellTypeComments)
With Cell.Comment.Shape.TextFrame
.Characters.Font.Name = "Comic Sans MS"
.Characters.Font.Size = 14
.Characters.Font.Bold = False
.AutoSize = True
End With
Next
End Sub
Von Heri
Sub Kommentar_eingeben()
' Es sind noch keine Kommentare vorhanden
' Ansonsten Error
Dim I As Integer
' On Error Resume Next
' vorhandener Kommentar wird entfernt
For I = 106 To 161
With Cells(I, 6)
.AddComment
.Comment.Visible = False ' Kommentar sollen ausgeblendet sein
.Comment.Text Text:=CStr(Cells(I, 7))
With .Comment.Shape
.ScaleWidth 4.24, msoFalse, msoScaleFromTopLeft
.ScaleHeight 0.51, msoFalse, msoScaleFromTopLeft
With .TextFrame.Characters
.Font.Size = 18
.Font.Name = "Comic Sans MS"
.Font.Bold = True
End With
End With
End With
Next I
End Sub
Gruß Hajo
nach einigen Experimenten habe ich bemerkt, dass deine Makros bereits kommentierte Zellen voraussetzen. In dieser Reihenfolge klappte es dann auf Anhieb.
Vielen Dank für deine Unterstützung.
Rüdiger